Identity insert fails with SQL Ce dialect and aggressive connection release mode.

Description

An entity's mapping document specifies that the identity Id generator will be used. The entity is inserted into a SQL CE database. The data is successfully inserted into the database but the session save operation fails when using aggressive connection release mode. The error occurs because the id is attempted to be selected on a different connection than the connection that issued the insert.

The workaround is to disable aggresive release mode.

Environment

None

Activity

Show:

Frédéric Delaporte 
April 30, 2017 at 9:50 PM

Was closed because fixed by commit 3f304ed. But some later port of Hibernate changes lost this fix. (2716624 & 3ce5929)

Alex Zaytsev 
January 22, 2014 at 3:54 AM
(edited)

Can anyone point me to discussion of this?

OrenE 
March 1, 2007 at 2:28 AM

The issue was discussed on the mailing list.
It has to do of not making the select last_insert_id() at the same batch as the insert.
This works for dialects that have Insert+Identity enabled only.

Former user 
March 1, 2007 at 2:13 AM

Looks like it wasn't fixed.

Former user 
February 27, 2007 at 2:01 PM

Should be fixed in CR1. Please test that and comment here if it doesn't work.

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created February 27, 2007 at 11:12 AM
Updated September 20, 2017 at 2:59 AM
Resolved May 15, 2017 at 2:31 PM
Who's Looking?