users@glassfish.java.net

Re: JPA, entity hierarchies and Discriminator column

From: <glassfish_at_javadesktop.org>
Date: Mon, 10 Dec 2007 06:42:22 PST

This seems like a strange limitation. If you were using TopLink Essentials I would recommend that you map the column as an @Basic and mark the @Column as updatable=false, insertable = false (just to ensure there are no conflicts between your code and the Persistence Provider). If you didn't mind using native TopLink you could simply add a 'QueryKey' for the discriminator column and would not need the mapping at all.

Otherwise you could explore Native queries and SQLResultSetMappings.
--Gordon
[Message sent by forum member 'gyorke' (gyorke)]

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