JPA 2.0 unfortunately states that "relationships are polymorphic" but offers no further detail on what it means by that.
Well polymorphic is pretty well understood term. Essentially it means using a common contract where different implementations of that might do different things. That is explicitly not what you have here. The polymorphic form here would be:
This is just the meaning of polymorphism in OO and really has nothing to do with mapping or O/RM or JPA.
Clarification is always good.
And I completely disagree about this "negat[ing] a large part of the benefit of an ORM system." Casting to and relying on specific subtypes is very against good OO principles.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Well polymorphic is pretty well understood term. Essentially it means using a common contract where different implementations of that might do different things. That is explicitly not what you have here. The polymorphic form here would be:
@OneToMany(mappedBy = "customer") Set<AbstractOrder> orders;
This is just the meaning of polymorphism in OO and really has nothing to do with mapping or O/RM or JPA.
Clarification is always good.
And I completely disagree about this "negat[ing] a large part of the benefit of an ORM system." Casting to and relying on specific subtypes is very against good OO principles.