Suppose in the same session you save an entity, update it and then delete
it...without commitint in the middle. What would you expect to happen?

I will expect NH to do nothing with the DB. Because the entity was never
persisted (by a commit)

This is possible if you don't use Identity. If you use identity NH will go
for the ID immediataly upon save...

There are other reasons and some cascade options will cause the save even
without identity...but you should strive to avoid forcing DB Hits...

Gustavo.

On Fri, Nov 7, 2008 at 11:00 PM, Jon Palmer <[EMAIL PROTECTED]>wrote:

>  I've seen this comment before but never found a good explanation of why
> identity is not recommended. Is there a good write up of the problem and
> what the various solutions are?
>
>
>
> Thanks
>
> Jon
>
>
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Fabio Maulo
> *Sent:* Friday, November 07, 2008 8:28 AM
> *To:* [email protected]
> *Subject:* [nhusers] Re: Second Level Cache on Insert
>
>
>
> 2008/11/7 Ayende Rahien <[EMAIL PROTECTED]>
>
> And, in general, it is not recommended to use identity for other reasons.
>
> usage of batching is one good reason
>
>
>
> It is an hard and heavy battle to fight.
>
>
>
> --
> Fabio Maulo
>
>
> >
>

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