当前位置:网站首页>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边栏推荐
- PlasticSCM 企业版Crack
- JWT vulnerability recurrence
- Longyuan war "epidemic" 2021 network security competition web easyjaba
- 我国算力规模排名全球第二:计算正向智算跨越
- Realize the attention function of the article in the applet
- Why do big companies such as Baidu and Alibaba prefer to spend 25K to recruit fresh students rather than raise wages by 5K to retain old employees?
- 学习MVVM笔记(一)
- Use of vscode software
- 已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
- The order of LDS links
猜你喜欢
What is test development? Why do so many companies hire test developers now?
@The problem of cross database query invalidation caused by transactional annotation
Learning notes 8
[array]566 Reshape the matrix - simple
输入的查询SQL语句,是如何执行的?
Rust区块琏开发——签名加密与私钥公钥
Interview byte, pass the exam and directly work on three sides. As a result, I found an architect to hang me?
How to realize real-time audio and video chat function
Uni app common functions /api
The development of mobile IM based on TCP still needs to keep the heartbeat alive
随机推荐
ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
Threejs Internet of things, 3D visualization of farms (II)
一文带你了解BI的前世今身与企业数字化转型的关系
The order of LDS links
lds链接的 顺序问题
JWT vulnerability recurrence
UI automation test farewell to manual download of browser driver
行为感知系统
反絮凝剂-氨碘肽滴眼液
Seven join join queries of MySQL
An elegant program for Euclid‘s algorithm
Use Firefox browser to quickly pick up Web image materials
Containerd series - what is containerd?
Differences among 10 addressing modes
[understand series after reading] 6000 words teach you to realize interface automation from 0 to 1
WGS84 coordinate system, web Mercator, gcj02 coordinate system, bd09 coordinate system - brief introduction to common coordinate systems
线上故障突突突?如何紧急诊断、排查与恢复
ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
我国算力规模排名全球第二:计算正向智算跨越
Threejs realizes the drawing of the earth, geographical location annotation, longitude and latitude conversion of world coordinates threejs coordinates