Hi,
In my opinion in your case there is no support from OJB.
because it is a problem of normalization of the db table.

You have two possibilities if now one sends you a other response ;)

1. normalize the table remove Col1 and declare Col2 and Col3 as primary
key.
   In this case ojb will update the second object.

2. Declare the constraints in the db and catch the exception in the
   Db layer of your application and try to update if the exception occurs.

Remarks: that is only a problem by creation. After creation you can work
with optimistic locking, have a look at the documentation of ojb.

Regards
Matthias




-----Ursprüngliche Nachricht-----
Von: Vagula [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 5. September 2006 09:48
An: OJB Users List
Betreff: RE: Concurrent Users-Please Help!


Hi,

        Let's say there is a Table A with columns Col1 (Id primary key), Col2,
Col3, and Col4.
        Say the data for the combination of col2 and col3 should be unique.


        Both user1 and user2 are trying to insert (create) the same data
        Col1- (id self generated)
        Col2-A
        Col3-1
        Col4-abc

        In my case two rows are inserted.
        What are the settings that I can make for adding a single row and 
updating
the same?

Regards,
Vagula




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

Reply via email to