The entity will always be only ever inserted.
The entity is immutable and will never be updated, we are essentially
storing an event that has occurred (event sourcing)
In our repository we are currently using the following (standard) pattern:
using(var _session = _sessionFactory.OpenSession())
{
_session.Save(myEntity);
}
You state that you can avoid select by calling session.Update or
session.Save. Are we not already calling session.Save?
Cheers,
Billy Stack
On Fri, Feb 4, 2011 at 4:21 PM, Jason Meckley <[email protected]>wrote:
> NH needs to know if the entity already exists or not. the only way to
> determine this is to query the db. You can avoid the select by calling
> session.Update or session.Save depending on whether the entity already
> exists.
>
> using Assigned means you want to take control of entity
> identification/persistence.
>
> --
> 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.