Dan,
I see what you mean, so why not this way:
order_number (a foreign key)
line_item_number (not null, the pk)
product
quantity
Only the line_item_number is the primary key. order_number is just a
foreign key and can be null.
This requires of course that the line_item_numbers are all unique and
not start to count from 1 for each order, but thats the way it is done
in your szenario - right? :-(
Hmmm...
\Daniel
Dan OConnor wrote:
>
> Hi Daniel,
>
> Your two cents are always welcome. Your solution does allow for a
> disconnected object as per the specification. However, a deployer
> should be able to map an entity using the EJB 2.0 CMP model
> without changing an existing normalized schema... especially if it
> would mean changing existing data. It would be inappropriate to
> require an organization to change existing line-item numbers (that
> might be used for various business purposes) just to take
> advantage of EJB technology.
>
> I believe the schema I described is quite common in practice.
>
> -Dan
>