It's almost working, but I've hit a wall and I hope somebody (original author?) could help me finish this.
What happens now is that when I use the "add new" drop down that I have added to my fork I end up with wrong rows. Say I have an abstract base class Base and two classes that extend it: Ext1, Ext2. The code can currently save Ext1 and Ext2 instances fine if all the fields (including a hidden field corresponding to the discriminator column), but if the following fails:
Add new, when only saved rows are shown: the subclass of the last element is chosen rather than the one requested.
Add new, after another new row was added: if the new row's subclass is different from the previous row's subclass, the previous row is cleared and its subclass changed to match the new row's requested subclass. All new rows are updated in this fashion when a new row is appended.
I can't figure out the logic of it, and I can't make it do the right thing. Could anybody point me in the right direction?
I'm doing some work to get subclassed entities (Doctrine ORM inheritance based on discriminator column) working correctly with the one-to-many inline editor. See these forked repositories: https://github.com/Uplink03/SonataDoctrineORMAdminBundle and https://github.com/Uplink03/SonataAdminBundle
It's almost working, but I've hit a wall and I hope somebody (original author?) could help me finish this.
What happens now is that when I use the "add new" drop down that I have added to my fork I end up with wrong rows. Say I have an abstract base class Base and two classes that extend it: Ext1, Ext2. The code can currently save Ext1 and Ext2 instances fine if all the fields (including a hidden field corresponding to the discriminator column), but if the following fails:
I can't figure out the logic of it, and I can't make it do the right thing. Could anybody point me in the right direction?