It seems that this is not true. For now I have:
- creating and building SessionFactory - creating and opening Sesssion (At this moment *next_hi* value in db was* 2131)* - starting transaction... - inserting values into two tables - selecting them Here is an SQL that I am getting outputted to the log: Starting Transaction... NHibernate: select next_hi from hibernate_unique_key with (updlock, rowlock) NHibernate: *update *hibernate_unique_key *set next_hi* = @p0 where next_hi = @p1;@p0 = *2132 *[Type: Int32 (0)], @p1 = *2131 * [Type: Int32 (0)] NHibernate: select next_hi from hibernate_unique_key with (updlock, rowlock) NHibernate: *update *hibernate_unique_key* set next_hi* = @p0 where next_hi = @p1;@p0 = *2133 *[Type: Int32 (0)], @p1 = *2132 * [Type: Int32 (0)] NHibernate: *INSERT INTO* Countries (Name, Code, Id) VALUES (@p0, @p1, @p2);@p0 = NULL [Type: String (4000)], @p1 = 0 [Type: Int32 (0)], @p2 = *215231* [Type: Int32 (0)] NHibernate: *INSERT INTO* Addresses (City, State, Zip, AddressLine1, AddressLine2, CountryFk, Id)VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6);@p0 = 'San Diego' [Type: String (4000)], @p1 = 'California' [Type: String (4000)], @p2 = '99999' [Type: String (4000)], @p3 = 'Address line 1' [Type: String (4000)], @p4 = 'Address line 2' [Type: String (4000)], @p5 = 215231 [Type: Int32 (0)], @p6 = *215332 *[Type: Int32 (0)] NHibernate: SELECT address0_.Id as Id0_0_, address0_.City as City0_0_, address0_.State as State0_0_, address0_.Zip as Zip0_0_, address0_.AddressLine1 as AddressL5_0_0_, address0_.AddressLine2 as AddressL6_0_0_, address0_.CountryFk as CountryFk0_0_ FROM Addresses address0_ WHERE address0_.Id=@p0;@p0 = 215332 [Type: Int32 (0)] NHibernate: SELECT country0_.Id as Id7_0_, country0_.Name as Name7_0_, country0_.Code as Code7_0_ FROM Countries country0_ WHERE country0_.Id=@p0;@p0 = 215231 [Type: Int32 (0)] Rolling back Transaction... So why I am having two updates of the next_hi value? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
