Propel2 icon indicating copy to clipboard operation
Propel2 copied to clipboard

Added polymorphic many-to-many relationships.

Open wleona3 opened this issue 9 years ago • 4 comments

Allows for polymorphic many-to-many relationships. Unfortunately at this time does not allow additional static FKs. The builder almost supports it, but since each polymorphic sibling requires a unique relation, the builder tries to also create a new relation for the other static FKs. Example: I have a table that has two static FK relationships A and B and two polymorphic siblings, C1 and C2. When creating object A the builder has to create properties and methods for the unique C1 and C2 relationships, but then also creates two B relationships, creating duplicate properties and methods. Not sure exactly how to implement that properly. But if that caveat is fixed, this would support any combination of static FKs and Polymorphic FKs.

wleona3 avatar Dec 30 '16 18:12 wleona3

Wow, that's a rather big change, thanks dude! I'd rather want to see that beauty in https://github.com/propelorm/Propel3 :P

marcj avatar May 15 '17 14:05 marcj

Thanks for the kind words marcj, unfortunately our company will be stuck with PHP 5.6 for the foreseeable future so we'll be sticking with Propel2

wleona3 avatar May 15 '17 15:05 wleona3

Whitespace corrected!

wleona3 avatar Jun 16 '17 13:06 wleona3