Closed clark0x closed 5 years ago
Hi @clarkorz have you found the solution to your problem in another post or tried asking on one of the other forums?
Contribution Guide | Stackoverflow | Google Group | Trello | IRC | Build Status
@CWyrtzen I have transformed my One-Way Many-to-One association into two associations: a Many-to-One and an One-Way One-to-One. Means, I add a Kinapping
Model between User
and Alien
. Since I define a few more attributes on Kinapping
model, not just two ids, so this makes more sense than a Many-to-Many.
But the idea of storing One-to-Many association relations on the One side not the Many side still make sense, especially for no-sql database like mongodb.
Hey @clarkorz. Since you got this resolved, I'm going to close this out. If you have an idea as to how we can make this type of associations more intuitive, I encourage you to open an issue with 'Feature Request' in the title explaining how we can make it better.
We are currently changing the way we handle feature requests so it might get shuffled around a bit. Rest assured though, your feedback is very much appreciated and will definitely be considered.
I need to define an One-Way One-to-Many association, something like above. The aliens come from out of space, so there is no way to set a reverse association (adapter is readonly). I expect that waterline stores all kinappers in user's
kinappedBy
attributes (as an array of id).But this doesn't work. Waterline parse this as a Many-to-Many association.