Does anyone have experience with multiple unique keys
per table in ojb and would like to share?

Consider the following scenario.

I have Table A with two unique keys:

1. one one-column primary key (autoincremented)
2. one 3 column unique key (2 references)

Objects of ClassA are made persistent to this table.
When I store Objetcs that reference Objects of type
ClassA I do not want OJB to store these objects when
there is already one with the same unique key. This
should be fully transparent. No exception, no manual
lookup of the refence. Is that possibly? Unfortunately I
only found a RowReader. And PersistenceBrokerAware only 
allows to throw Exceptions. I would like to have a solution
set performs a lookup and if an objetcs with the same 
unique key is found the object will not be stored and gets
the primary key set. Is such a solution possible? And what is 
with the cache. There are now two instances representing 
the same entity. Do I have to clearh the cache?

Thanks in advance,
Vincenz


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to