OK, after thinking about it a little more and studying the code, I understand your point of creating a dependency between -engine and ORM. Moreover, the code is going to be ugly too.
When we talked about this issue with Yoann the other day, he gave me an idea I haven't considered it at the time because I thought it wasn't that nice. It might in fact be the best way to fix the issue:
-
we collect the collection roles in the parseContext;
-
we add all the collectionRoles of the parents to the inheriting classes.
This way, we can still have a simple behavior, we keep isSubRole as is and we don't create a dependency to obscure behaviors of ORM.
Thoughts?
|