Peter, Another solution (possibly no more desirable and oh-so-obvious, but which I would expect would work) would be to simply duplicate the FastVistor mapping information in the Vistor mapping and drop the extends.
Best - Margaret -----Original Message----- From: Peter T. Brown [mailto:peter@;memeticsystems.com] Sent: Thursday, November 14, 2002 7:58 PM To: [EMAIL PROTECTED] Subject: [castor-dev] two class mappings, same table Hi-- I have two classes which map to the same table (mapping snippet is attached). One class extends the other so that I can save on SQL JOIN overhead for certain operations which dont require the complete set of collected data... Selecting objects of either class works fine. Creating new records however of the SUB class (Visitor) causes this problem: java.sql.SQLException: ERROR: ExecAppend: Fail to add null value in not null attribute ID Is this because castor ignores key-generator parameters for sub-classes, since they are supposed to use the same identity as their super class? (I suspect this because trying to associate any key generator with the sub class never creates a castor message denoting the instantiation of that generator.) So my problem is that I can only create new FastVisitor's and never Visitor's. Since both classes have to use the same key gen, the only solution I can think of is to create a FastorVisitor, get an ID, commit the transaction then select out the same record as a Visitor. But I dont want to do this for performance reasons. Any other ideas? Thanks -Peter ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
