Alessandro Colantoni wrote:
I'm using ojb 1.0.1 with sql server.
When I store an object, and then I delete it directly on the db I can't insert it a second time.
 Before storing I use to check if an object with the same key exists.
ojb doesn't detect any object with the same key (correctly... I deleted it)
But when storing it catch a sql server exception because primary key already exists. Is it a limit of microsoft sql server (it keeps primary key somewhere?) or I'm doing something wrong?

This sounds like a transaction isolation problem. If you use the PB API with
OJB without the two-level cache you will not have any transaction isolation
and a delete will be directly visible in the cache before commit.

However, if you don't use auto-commit on the Connection to MSSQL the database
DELETE will not be performed until COMMIT.

What is your auto-commit setting in repository_database.xml and which OJB API
are you using?

Regards,
 Martin


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

Reply via email to