Accessing a collection that contains C2 instances failes with the following message:
"Trying to set value [C1] for instance variable [parent] of type [P] in the object. The specified object is not an instance of the class or interface declaring the underlying field, or an unwrapping conversion has failed."
Well, as C1 is a descendent of P, the above message is wrong!
We are totally stuck now as we may not change the table schema, but have to deliver a JPA based software which is able to reflect this flexible type of trees. Is there a workaround or patch we can apply to convince EclipseLink that a C1 instance is definitively a P due to the inheritance?