Tim,

You will need this as a reference:
http://db.apache.org/ojb/tutorial3.html#mapping%20m:n%20associations

In this case i would set my tables up like this
Note (noteId, noteTypeId, message)
InvoiceNote(invoiceId, noteId)
ShipmentNote(shipmentId, noteId)

You may need the note type so you will know if it is a invoice note or
shipment note.

Use the example in the link and apply it to what you are doing.  Instead
of Project, PersonProject Person you will have Invoice, InvoiceNote,
Invoice.

Hope that helps.

-chris worley
>
> 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.
>
> I suppose a work-around would be to have two exact same but
> differently named interfaces for the Note object, but that seems
> kludgy.
>
> Thanks,
>
> -tim
>
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to