You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case of a domain class (a) inheriting from an abstract class (b), b is now considered as a parent persistent entity in AbstractPersistentEntity.initialize() so that a is no more considered as a root so that all entities are now stored in a common collection named after b.
with [grails-datastore-core 4.0.6] an abstract parent class is not considered as a parent entity, all child classes (a and other classes inheriting from b) are root, and entities are stored in their own collection named after a (from the mapping variable collection field for example).
This is so because of the test: !Modifier.isAbstract(superClass.getModifiers()) that has been removed in 5.0.0
is this the expected behavior since grails-datastore-core 5.0.0 ?
if yes what is recommended to handle such a situation (many domains inheriting from a common abstract class and each one using its own collection).
thanks
Sebastien
The text was updated successfully, but these errors were encountered:
Yes, we had to change abstract classes outside of domain folder to trait and it solved the problems. With abstract parent class not being in domain you may also run in other problems like id is missing in class.
[grails 3.10, grails-datastore-core 5.0.0.RELEASE, mongodb-5.0.0.RC4]
In the case of a domain class (
a
) inheriting from an abstract class (b
),b
is now considered as a parent persistent entity inAbstractPersistentEntity.initialize()
so thata
is no more considered as aroot
so that all entities are now stored in a common collection named afterb
.with [grails-datastore-core 4.0.6] an abstract parent class is not considered as a parent entity, all child classes (
a
and other classes inheriting fromb
) are root, and entities are stored in their own collection named aftera
(from the mapping variablecollection
field for example).This is so because of the test:
!Modifier.isAbstract(superClass.getModifiers())
that has been removed in 5.0.0is this the expected behavior since grails-datastore-core 5.0.0 ?
if yes what is recommended to handle such a situation (many domains inheriting from a common abstract class and each one using its own collection).
thanks
Sebastien
The text was updated successfully, but these errors were encountered: