-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add autoPopulate option and documentation for the associations options. #125
base: master
Are you sure you want to change the base?
Conversation
Add documentation for associations.
@sdebionne looks great, would you be willing to include a few tests? (this should mostly be a cut and paste job of existing tests just changing the |
@mbroadst I have update the tests for belongs-to-many and... they do not pass. Let me try to explain the problem with the list controller: deleting the For the first test case that fails: Any idea on this? |
@sdebionne when we auto associate, we create internal "sub-resources". I think what you really are trying to do is conditionally disable the |
@mbroadst I'm trying to achieve this result: |
Delete options.include for the primary resource only. For the subresource, delete the properties of the associated model in then `list.send.before` milestone.
@mbroadst I am not fully happy with this solution as I would prefer that Sequelize generates the query I need rather than cleaning the results in post processing step ( |
@sdebionne sorry I've got limited time this week to work on this, I'm confident we can get something working but it will be a few days |
@mbroadst No worry, I have a working version to play with, just not as optimized as I would like to... |
Hi @mbroadst and @sdebionne, I'm just starting to use this repo on a couple of projects I'm working on and saw this PR sitting here with a feature set that I'm certainly keen to see implemented. Have there been other PRs that achieve a similar thing to this and so this one has been shelved? If it's just the conflicting files that need a revisit, I'm more than happy to have a look. I can't see anything in the docs that point to other PRs related to associations. Also - on the docs front, there doesn't seem to be anything about associations (even the simple Thanks for your help and kudos on the work you've done there. Cheers Cam |
@cam861 I believe it was never merged because the tests never passed, and therefore the feature is incomplete. If you want to take a stab at rebasing the PR and getting everything passing, by all means go ahead - your contribution is very welcome. Also, if you want to commit documentation about auto population these would be very welcomed changes as well! |
No description provided.