The mapping declares the column as being generated by SQL, so it's the
DB's responsibility to generate this.  Using MS SQL Server, the
declaration should look something like

 

create table MyTable (

                ...

                Version rowversion not null

)

 

I suspect that you've got the wrong column type in the DB

 

Pete

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Aleksey Filippov
Sent: 18 September 2012 06:41
To: [email protected]
Subject: [nhusers] Using bynary array as a version column

 

There's my question on StackOverflow:
http://stackoverflow.com/questions/12402903/cant-save-entity-because-of-
null-version-column-nhibernate. 

Now I can save edits on entity without a problem but version column
stays null (checked it in SQL Server) all the time even provided that I
defined my mappings for that entity:

<version name="Version" generated="always" unsaved-value="null"
type="BinaryBlob">
    <column name="Version" not-null="false" sql-type="timestamp"/>
</version>

What do I do wrong? What have I missed?

 

-- 
You received this message because you are subscribed to the Google
Groups "nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/UmCjVXAKeCgJ.
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.

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