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

Database relation support #81

Closed
evolic opened this issue Feb 25, 2017 · 5 comments
Closed

Database relation support #81

evolic opened this issue Feb 25, 2017 · 5 comments

Comments

@evolic
Copy link

evolic commented Feb 25, 2017

Can you consider to add database relation support to your ORM?

@dac514
Copy link
Contributor

dac514 commented Feb 26, 2017

You can do relations with "Aggregate Roots"

https://www.opulencephp.com/docs/1.0/orm-units-of-work#aggregate-roots

@evolic
Copy link
Author

evolic commented Feb 27, 2017

I was thinking about following relations:

  • 1 to 1
  • 1 to many
  • many to many

@creocoder
Copy link
Contributor

creocoder commented Dec 24, 2017

@opulencephp I think it's better to change example in https://www.opulencephp.com/docs/master/orm-units-of-work#aggregate-roots to some more common case. To User and Post for example. I do not think Password aggregate root is common solution and may confuse people.

@davidbyoung
Copy link
Member

davidbyoung commented Dec 24, 2017

@creocoder That's a fair suggestion. I'll change the example, but User and Post objects typically aren't created together. I'll update the example to be an Invoice with multiple LineItem objects.

@creocoder
Copy link
Contributor

@opulencephp Thanks, great idea!

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

4 participants