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

Added fix to hasOne relationship #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ee0pdt
Copy link

@ee0pdt ee0pdt commented Sep 23, 2014

I have made a fix and a couple of simplifications to the way ModelCore handles relationships. Hope this helps!

@letanure
Copy link
Contributor

letanure commented Oct 3, 2014

👍

@fernandofleury
Copy link
Collaborator

What was the previous problem you faced with hasOne relationships? I'm trying to understand why you changed the search of hasMany to hasOne

@ee0pdt
Copy link
Author

ee0pdt commented Oct 5, 2014

I believe the author may have made a copy-paste error, in the definitions for one to one relationships it looks like code was pasted from the many to many relationship instead.

Also, it was missing the 'new' keyword...

Basically, one to one relationships cannot work at all with the current code, but do work with the changes I've suggested. I recommend you test them out to make sure, and there might be a simpler solution but this one works as far as I know,.

@klederson klederson added the ready label Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants