-
Notifications
You must be signed in to change notification settings - Fork 22
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
Relationships #27
Comments
In your |
@akDeveloper yes that was a typo in what I have written here not in source code. Have updated the comment. Thank you. |
I think the issue is that it's mapping Docs say:
So you gotta use the or you can change the db structure to use the same explicit column names if you want to use the "auto mapping" .... so like this: article table
user table
So |
@jakejohns yes. After your post, I re-read the docs once again today and sounds right. Thank you. |
Hi Paul,
I came across a strange issue in relationship. Was trying to write a unit test, but reading https://github.com/atlasphp/Atlas.Orm#relationships I got a bit confused so thought of discussing the same.
We have an
articles
table andusers
table.Articles Table
Users Table
The mapper was defined as
Now when you fetch article id 2 it returns
Bond
as user, but it should return James instead.When we add
on
it works as expected. I noticed when we change article id to 3, it tries to fetch user with id 3. Is that expected ? That is where I got confused with the docs https://github.com/atlasphp/Atlas.Orm#relationshipsThank you
The text was updated successfully, but these errors were encountered: