Skip to content
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

missing .add method on hasMany relation #3

Open
ebarault opened this issue Oct 26, 2016 · 2 comments
Open

missing .add method on hasMany relation #3

ebarault opened this issue Oct 26, 2016 · 2 comments
Labels

Comments

@ebarault
Copy link

Hi Jonathan,

Thx for providing this mixin! I am currently developping a similar import mixin, but based on json files, self-including the mapping schema.

I noticed in your code what could be an error.
here, you use a .add method on a hasMany relation, which i believe does not exist.

 I doubled checked this since in my code I need to deal with the hasMany relation in a different manner than hasManyThrough and hasAndBelongsToMany

@jonathan-casarrubias
Copy link
Collaborator

Hey @ebarault thanks for reaching out.

Hey so, you are right... There is an add method but just for hasManyThrough and hasAndBelongsToMany, I just verified and for hasMany should be create instead of add.

This is stated here: https://strongloop.com/strongblog/defining-and-mapping-data-relations-with-loopback-connected-models/

It looks like an easy fix, maybe you could help by adding a pull request on this? so this can be fixed faster.

I will be integrating all of these modules and mixins within the new FireLoop CLI Tool, so I may be able to fix it in a near future but not as soon as possible.

Cheers
Jon

@ebarault
Copy link
Author

ebarault commented Oct 27, 2016

@jonathan-casarrubias hey why not ! 👍
I'll try to do it next week.

Nice initiative this FireLoop thing by the way, i see a lot of the usual stuff i integrate with loopback already in. I'd be interested to join the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants