Don't you think it's a bit not obvious?
I mean why then NHibernate does not throw exception when I try to modify
anything without transaction?

Another question:
I want to perform several hundreds updates or inserts (this operations
require about 1 minute of time) and at the same time I don't want to block
access to table I'm updating. How to implement this with NHibernate?

On Mon, Mar 22, 2010 at 3:15 PM, John Davidson <[email protected]> wrote:

> Not using transaction, which is required in 2.1+
>
> John Davidson
>
> On Mon, Mar 22, 2010 at 5:53 AM, Petr Syromolotov <
> [email protected]> wrote:
>
>> Hello
>> I have a method that performs two operations:
>> 1. inserts new record to table using ISession.Save() method.
>> 2. queries this table using nhibernate linq  Session.Linq<T>();
>>
>> When I use transaction everything works fine:
>>  first insert statement is issued then select statement.
>>
>> But when I remove transaction, insert statements are not issued at all.
>> If I force flush (using ISession.Flush()) then NHibernate issues insert
>> but AFTER select.
>>
>> I tried to set FlushMode to always but it didn't help.
>>
>> What am I doing wrong?
>>
>> --
>> 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]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>  --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>

-- 
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.

Reply via email to