当前位置:网站首页>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边栏推荐
- kubernetes集群之调度系统
- C语言课设:影院售票管理系统
- Threejs factory model 3DMAX model obj+mtl format, source file download
- 25K 入职腾讯的那天,我特么哭了
- 优先使用对象组合,而不是类继承
- Rome链分析
- About the recent experience of writing questions
- 3. Package the bottom navigation tabbar
- laravel8 导出Excle文件
- Enterprise level: spire Office for . NET:Platinum|7.7. x
猜你喜欢
面试字节,过关斩将直接干到 3 面,结果找了个架构师来吊打我?
Three level linkage demo of uniapp uview u-picker components
陇原战“疫“2021网络安全大赛 Web EasyJaba
C language course setting: cinema ticket selling management system
Threejs realizes sky box, panoramic scene, ground grass
@Transactional 注解导致跨库查询失效的问题
Threejs Internet of things, 3D visualization of farms (II)
[brush questions] BFS topic selection
mysql的七种join连接查询
特殊版:SpreadJS v15.1 VS SpreadJS v15.0
随机推荐
Alibaba cloud ECS uses cloudfs4oss to mount OSS
DMX parameter exploration of grandma2 onpc 3.1.2.5
小程序中实现文章的关注功能
Basic function learning 02
Online text line fixed length fill tool
Summary of scene design
Get to know MySQL connection query for the first time
Deep learning - LSTM Foundation
学习MVVM笔记(一)
Threejs Internet of things, 3D visualization of factory
What is test development? Why do so many companies hire test developers now?
25K 入职腾讯的那天,我特么哭了
Learning notes 8
On the day 25K joined Tencent, I cried
测试开发是什么?为什么现在那么多公司都要招聘测试开发?
Is "golden nine and silver ten" the best time to find a job? Not necessarily
Threejs clicks the scene object to obtain object information, and threejs uses raycaster to pick up object information
Wechat applet development process (with mind map)
IronXL for . NET 2022.6
Possible stack order of stack order with length n