users@glassfish.java.net

Re: Cannot find value in class indicator mapping in parent descriptor

From: <glassfish_at_javadesktop.org>
Date: Tue, 06 Mar 2007 07:19:35 PST

Yes, but DiscriminatorValue can only be used on concrete class types.

The problem is that Parent is abstract and doesn't have any concrete entity subclasses. The spec states in section 2.1.9.1:
"An abstract entity is mapped as an entity and can be the target of queries (which will operate over and/or retrieve instances of its concrete subclasses)."
TopLink Essentials throws this exception up front, as querying on this entity later on will cause problems since it cannot be queried on. When Child extends Parent instead of GrandParent, Parent then has a concrete subclass with a DiscriminatorValue that can be queried.

Hope this helps,
Chris
[Message sent by forum member 'chris_delahunt' (chris_delahunt)]

http://forums.java.net/jive/thread.jspa?messageID=206463