Steve, thanks - this is what I ended up doing. Not perfect, but not too ugly either.
-tim > -----Original Message----- > From: sclark [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2003 5:51 PM > To: [EMAIL PROTECTED] > Subject: Re: map one object to two separate tables? > > > Tim, > > What I've done in this situation is to make an abstract Note > class which has all of the behavior of a Note. Then create > two empty subclasses, InvoiceNote and ShipmentNote. If > you're dealing with proxies, you'd do the same thing with the > interfaces: InvoiceNote implements InvoiceNoteItf extends > NoteItf. Note itself will never appear in your > repository.xml; just map the subclasses. > > -steve > > Steve Clark > Technology Applications Team > Natural Resources Research Center/USGS > [EMAIL PROTECTED] > (970)226-9291 > > > Tim Drury writes: > > >I have a generic Note object which is a child to two > entirely different > >parent objects. I would like two note tables to store the > Note objects > >- one table for (e.g.) Invoice notes and one table for > Shipment notes. > >I think two tables is necessary because Invoices and Shipments have > >separate PK sequences and, therefore, can generate duplicate values > >which would cause problems in a single Note table. > > > >Can OJB do this? I couldn't figure out how to tell Invoices > to use the > >InvoiceNote table and Shipments to use the ShipmentNote table. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
