Symfony doctrine has one through relationship #10232
Unanswered
bocanhcam
asked this question in
Support Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to make a relationship like "has one through" in Laravel.
I have a table called "locked_users" with 2 columns "user_id" and "user_type" related to 2 tables "members" and "customers" with a one-to-one relationship.
For example "locked_users" I would have:
I tried to have both relationship "Customer" and "Member" in my "LockedUser" entity but it doesn't seem to work:
I also tried to use Inheritance Mapping which creates an abstract class called "LockedUser" and moves the relationship to 2 subclasses "LockedCustomer" and "LockedMember" but it doesn't seem to work either.
When I save an entity. it just only can save one "Customer" or "Member". If one works then the other doesn't. Sometimes both do not work
Beta Was this translation helpful? Give feedback.
All reactions