2
votes

I use inherited entities based on SINGLE_TABLE inheritance type. I can declare the admin service, setting setSubClasses in my config, as describe in the doc here: http://sonata-project.org/bundles/admin/master/doc/reference/advanced.html#inherited-classes

But I have the following error when creating or deleting:

$identifier cannot be empty.
500 Internal Server Error - InvalidDomainObjectException
1 linked Exception: InvalidArgumentException 

Anyone already experience this?

1

1 Answers

1
votes

I had the same problem as you. After digging around, I think I may have found the issue.

My set up is similar to the following:

I have a UserEditableObject class, which (almost) everything the user can edit extends from. I was getting the InvalidDomainObjectException error on my Page object, which extends from UserEditableObject, and is mapped using SINGLE_TABLE inheritance.

I had a getId() method in the page, which was calling Page::id. When I remove this getId method, the error stopped. Please let me know if this fixes your issue as well.