OK, after thinking about it a little more and studying the code, I understand your point of creating avoiding to create a dependency between -engine and ORM. Moreover, the code is going to be ugly too with hardcoded class names and so on .
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 all the collection roles in the parseContext; - we add all the collectionRoles of the parents to the inheriting classes so all the collection roles collected so far because we analyze the hierarchy top down .
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?
|