Skip to content

Added fix to hasOne relationship#30

Open
ee0pdt wants to merge 2 commits into
klederson:masterfrom
ee0pdt:master
Open

Added fix to hasOne relationship#30
ee0pdt wants to merge 2 commits into
klederson:masterfrom
ee0pdt:master

Conversation

@ee0pdt

@ee0pdt ee0pdt commented Sep 23, 2014

Copy link
Copy Markdown

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

@letanure

letanure commented Oct 3, 2014

Copy link
Copy Markdown
Contributor

👍

@fernandofleury

Copy link
Copy Markdown
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

ee0pdt commented Oct 5, 2014

Copy link
Copy Markdown
Author

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