当前位置:网站首页>Sequelize. JS and hasmany - belongsto vs hasmany in serialize js
Sequelize. JS and hasmany - belongsto vs hasmany in serialize js
2022-07-05 04:07:00 【Rich in starch】
problem :
What's the difference between B.belongsTo(A)
and A.hasMany(B)
B.belongsTo(A)
and A.hasMany(B)
What's the difference
Artist = sequelize.define('Artist', {});Album = sequelize.define('Albums', {});Album.belongsTo(Artist, foreignKey: 'album_belongsl_artist');Artist.hasMany(Album, foreignKey: 'artist_hasmany_albums');
if it in both cases creates the depended tables in Album
? If it is in both cases Album
Created dependency table ?
Solution :
Reference resources : https://stackoom.com/en/question/1N8ZD边栏推荐
- 面试字节,过关斩将直接干到 3 面,结果找了个架构师来吊打我?
- 快手、抖音、视频号交战内容付费
- 网络安全-记录web漏洞修复
- Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
- 为什么百度、阿里这些大厂宁愿花25K招聘应届生,也不愿涨薪5K留住老员工?
- 我国算力规模排名全球第二:计算正向智算跨越
- Un réveil de l'application B devrait être rapide
- Is "golden nine and silver ten" the best time to find a job? Not necessarily
- CTF stegano practice stegano 9
- Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery
猜你喜欢
Interview summary: This is a comprehensive & detailed Android interview guide
How to solve the problem that easycvr changes the recording storage path and does not generate recording files?
Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
What is the reason why the webrtc protocol video cannot be played on the easycvr platform?
Plasticscm enterprise crack
How to realize real-time audio and video chat function
Threejs factory model 3DMAX model obj+mtl format, source file download
为什么百度、阿里这些大厂宁愿花25K招聘应届生,也不愿涨薪5K留住老员工?
EasyCVR平台出现WebRTC协议视频播放不了是什么原因?
我就一写代码的,王总整天和我谈格局...
随机推荐
mysql的七种join连接查询
Use threejs to create geometry, dynamically add geometry, delete geometry, and add coordinate axes
[array]566 Reshape the matrix - simple
[untitled]
线上故障突突突?如何紧急诊断、排查与恢复
输入的查询SQL语句,是如何执行的?
面试汇总:这是一份全面&详细的Android面试指南
[数组]566. 重塑矩阵-简单
Phpmailer reported an error: SMTP error: failed to connect to server: (0)
Un réveil de l'application B devrait être rapide
[wp]bmzclub writeup of several questions
官宣!第三届云原生编程挑战赛正式启动!
Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
Threejs Internet of things, 3D visualization of farms (II)
反絮凝剂-氨碘肽滴眼液
Possible stack order of stack order with length n
Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
IronXL for .NET 2022.6
UI自動化測試從此告別手動下載瀏覽器驅動