Exactly, I don't use transactions for this. I know it's best practice and I
use them in a few other NH based apps, but in this app (deep brownfield),
the explicit save makes a lot of sense.

/G



2011/5/20 Fabio Maulo <[email protected]>

> No Ramon, he can do very strange things using the trick of my post.
> With that trick, previous to NH3.1, you can modify anything and NH will
> ignore your changes until you explicit call a method to persist the entity
> as: Persist, Update, SaveOrUpdate, Merge
>
>
> On Fri, May 20, 2011 at 11:41 AM, Ramon Smits <[email protected]>wrote:
>
>>
>>> 1. Load entity
>>> 2. Modify entity
>>> 3. Validate entity.
>>> 4. If validation succeeds, Session.Save it, if not don't do anything.
>>>
>>
>> Aren't you using transactions? As when validation fails you should do a
>> rollback because you have modified te entity.
>>
>>
>
>
> --
> Fabio Maulo
>
>

Reply via email to