-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[email protected] breaks saving associations #6580
Comments
@wulfsolter Thanks for posting, we'll take a look as soon as possible. In the meantime, if you haven’t already, please carefully read the issue contribution guidelines and double-check for any missing information above. In particular, please ensure that this issue is about a stability or performance bug with a documented feature; and make sure you’ve included detailed instructions on how to reproduce the bug from a clean install. Finally, don’t forget to include the version of Node.js you tested with, as well as your version of Sails or Waterline, and of any relevant standalone adapters/generators/hooks. Thank you! |
Ran into what I think might be a related error on 0.12.0 when attempting to populate associations:
Isolated this down to populating one-to-many associations. Issue appears to be occurring in waterline-sequel when it attempts to pull the schema for the associated model. In my case I have a Resource model which references a Location model. Here's the Location definition:
When waterline-sequel goes to pull the schema from the definition, it isn't there for the resources field. https://github.com/balderdashy/waterline-sequel/blob/master/sequel/select.js#L111
Hope that helps. Rolled back to 0.11.5 for the moment. |
@wulfsolter @aradnom thanks for the heads up, I'll check it out. It should have been backwards compatible with Waterline |
Submitted a patch to waterline-sequel and once tested will push out a patch to sails-mysql. |
Tried balderdashy/waterline-sequel@b07af49 but doesn't resolve the error I found which is, as others have pointed out, in populating of associations as well not just saving. FWIW, I'm using many-to-many relationship defined as
Trip
|
I went ahead and set the |
Ok @wulfsolter I submitted balderdashy/waterline-sequel#85 which patches up the m:m test I put together and the one @Bazze had in the waterline-sequel repo. I'm going to do some more manual testing but hopefully this will get this fixed up once and for all. |
Thanks @particlebanana works great for me! Issue resolved from my end. |
bump wl-sql for fixing #297
I am not able to do many to many association in sail version 0.12.3.Is this not resolved yet or I am doing something wrong? My problem is similar to @wulfsolter. I need Help asap.Also I want custom name for my join table How I can achieve that? |
@karambeerPrime everyone "needs" help "asap" ;) If your need is severe and/or urgent, Balderdash are available for consulting on SailsJS. As you've read this thread, you would have seen that the issue was caused by a temporary regression in For documentation on how to use associations, please see Sails Concepts and Sails Reference. Everything needed to work with associations in SailsJS is contained in the documentation. |
This used to work in 0.11.5 but now fails in 0.12.0
Error message:
Removing
node_modules
andnpm install
ing again doesn't fix. Reverting to 0.11.5 on my prod boxes for now.Versions:
Node v5.9.0
Sails 0.12.1
The text was updated successfully, but these errors were encountered: