Thanks for that, I've just been looking at this in the docs, could you
clarify that this means I need to add a version column to my table and a
Version property to my entity?

2009/4/1 Paco Wensveen <[email protected]>

> You can use a "version" int property if you also want optimistic
> concurrency
>
>
> On 4/1/09, DannyT <[email protected]> wrote:
>>
>> We're using GUIDs as our identifier, however our entities may be created
>> on the server (which we rely on NH to sort out the IDs for) or within a
>> client application which will generate and assign the ID.
>>
>> Currently when trying to save an entity generated from the client app
>> which will have a GUID but will not already exist in the NH db I get the
>> error:
>>
>> NHibernate.StaleStateException: Unexpected row count: 0; expected: 1
>>
>> Should NH not detect the entity doesn't already exist in the database,
>> despite the fact it has an ID and insert it? Otherwise what else should we
>> be doing to allow for this?
>>
>> Dan
>>
>>
>>
>
> >
>


-- 
http://danny-t.co.uk

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