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

Support OneToMany relations #18

Open
pschaub opened this issue Nov 14, 2018 · 2 comments
Open

Support OneToMany relations #18

pschaub opened this issue Nov 14, 2018 · 2 comments

Comments

@pschaub
Copy link

pschaub commented Nov 14, 2018

Currently ManyToOne, ManyToMany and OneToOne are supported.

Annotation on OneToMany relations
Currently the annotation is ignored if you use it on an OneToMany relation.

Workaround
You need to set the annotation to the mapped side (ManyToOne) instead of the inversed side (OneToMany).

Suggestion
There should be support for "OneToMany" relations.
OR
There should be a error message to warn the developer about the mistake.

@RubenHarms
Copy link
Contributor

I agree to you! #19 was a recent improvement for the inversed side of the ManytoMany. The code should be similar for the inversed side of ManyToOne (OneToMany). @RuSPanzer isn't it?

@RuSPanzer
Copy link
Contributor

If OneToMany and ManyToOne bidirectional relations, just mark onSoftDelete in mapped side (entity with ManyToOne annotation).
If reference unidirectional... Seems to need to be removed all dependent entities with $collection->clear(). it's more like mapped side MTM.

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

3 participants