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

Relations #644

Open
kmashiki opened this issue Jun 27, 2018 · 0 comments
Open

Relations #644

kmashiki opened this issue Jun 27, 2018 · 0 comments

Comments

@kmashiki
Copy link

For the A.hasOne(B, ...) relation, does this mean that A must have exactly one B or that A must have at most one B?

Also,
For example,
Post.hasOne(Geo, "geo", "geo_id", "associated.id").
User.hasOne(Geo, "geo", "geo_id", "associated.id").
School.hasOne(Geo, "geo", "geo_id", "associated.id").
How would you define the other direction of the relation?
We basically want to say something like 'Geo.belongsTo(Post || User || School,' but are not sure of the syntax.

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

No branches or pull requests

1 participant