You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sushantdhiman Thanks for your reply. The build method is working. The save method seems to have a problem with isNewRecord: false. In this case there are no sql statements for the assocation. I tried both with and without the include option.
@sushantdhiman Hey, I'd love to tackle this one. I have a use-case for this at work too so its a win/win :D
All that being said I do need some direction. I've gone through the code, wrote test cases and poked through but I am not 100% sure where to start :) and what needs to be touched.
When I called the save function I thought I could finnaly taking advantage of the fact that I use an ORM and I don't have to write all the update and delete queries myself for the assosiations. Was I disappointed that only the main object was saved. I now still don't understand what the advances are using an ORM like this.... You lose a lot of control and development is nothing faster.....
Reacted by lchenshui, 300Baud, Pavel Ravits, Alexander KIRILOV, Niko Lockenvitz, sergiomendonca and seddik11
Activity
sushantdhiman commentedon Mar 23, 2018
You have to try with latest version, I remember fixing this
ro70 commentedon Mar 23, 2018
@sushantdhiman I updated to 4.37.4 but it's still not working.
sushantdhiman commentedon Mar 24, 2018
It works, here is full testcase, if you think it doesn't may be try presenting a SSCCE
sushantdhiman commentedon Mar 24, 2018
Ah, may be it builds properly but doesn't save? In any case I will need a SSCCE
sushantdhiman commentedon Mar 24, 2018
Have you tried this
ro70 commentedon Mar 24, 2018
@sushantdhiman Thanks for your reply. The build method is working. The save method seems to have a problem with
isNewRecord: false. In this case there are no sql statements for the assocation. I tried both with and without the include option.Output is
sushantdhiman commentedon Mar 25, 2018
What you want is update entire includes chain, rather than creating them. This is not supported in Sequelize yet. I will tag this as feature request.
ro70 commentedon Mar 25, 2018
@sushantdhiman Thanks for the information. I think in the meantime I will do like
What do you think?
mirkojotic commentedon Jul 4, 2018
@sushantdhiman Hey, I'd love to tackle this one. I have a use-case for this at work too so its a win/win :D
All that being said I do need some direction. I've gone through the code, wrote test cases and poked through but I am not 100% sure where to start :) and what needs to be touched.
RoelRoel commentedon May 10, 2019
When I called the save function I thought I could finnaly taking advantage of the fact that I use an ORM and I don't have to write all the update and delete queries myself for the assosiations. Was I disappointed that only the main object was saved. I now still don't understand what the advances are using an ORM like this.... You lose a lot of control and development is nothing faster.....
aat2703 commentedon Aug 2, 2019
I'm also running in to theese issues.. Also why is there no filtering available on build method?
For some reason fields: [] option is not available?
papb commentedon Aug 2, 2019
@RoelRoel Although
build+saveapparently don't work, I know thatcreateworks with associations. Have you tried that as a workaround?papb commentedon Aug 2, 2019
@aat2703
Can you clarify what you mean by this? What did you want to do that can't be done?
papb commentedon Jan 9, 2020
Duplicate of #6808
papb commentedon Jan 16, 2020
This has been centralized in #11836