users@glassfish.java.net

Re: Two entity classes mapped to same table

From: <glassfish_at_javadesktop.org>
Date: Fri, 18 May 2007 12:49:48 PDT

Hi Andrew,

The O/R mapping frameworks I know assume that instances mapped to the same table are uniquely identified by their primary key. This is not the case in your case, as id=4 maps to instances of different classes. The discriminator column used for inheritance is usually not part of the primary key.

Do EntityClassB and EntityClassC share any common state, as they map to distinct columns? Why do you need map the two classes to the same table?

Thanks,

-- markus.
[Message sent by forum member 'mf125085' (mf125085)]

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