Hello,
I have an hierarchical chain of 3 objects:
Abstract class "A" (MappedSuperclass) <|-- Abstract class "B" (@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)) <|-- Concrete Class "C"
Concrete class C has an One to One relationship with class D and Object D an One to One relationship with class E
I'm doing an Interface that extends Specification< B >
I do a join on D (looking from perspective of C, I think it's implicit).
When I add another join on D.E it fails with :
"Unable to locate Attribute with the the given name [attribute name of D on C class] on this ManagedType [class A]; nested exception is java.lang.IllegalArgumentException: Unable to locate Attribute with the the given name [attribute name of D on C class] on this ManagedType [class A]"
When I add another level (D.E) it fails to downcast and starts looking D on A.
Any idea on this?
Should I use Criteria API with treat to down cast?
Is something wrong in my logic?
Thank you in advance.
Hello,
I have an hierarchical chain of 3 objects:
Abstract class "A" (MappedSuperclass) <|-- Abstract class "B" (@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)) <|-- Concrete Class "C"
Concrete class C has an One to One relationship with class D and Object D an One to One relationship with class E
I'm doing an Interface that extends Specification< B >
I do a join on D (looking from perspective of C, I think it's implicit).
When I add another join on D.E it fails with :
"Unable to locate Attribute with the the given name [attribute name of D on C class] on this ManagedType [class A]; nested exception is java.lang.IllegalArgumentException: Unable to locate Attribute with the the given name [attribute name of D on C class] on this ManagedType [class A]"
When I add another level (D.E) it fails to downcast and starts looking D on A.
Any idea on this?
Should I use Criteria API with treat to down cast?
Is something wrong in my logic?
Thank you in advance.