The Microsoft Timestamp SQL type has nothing to do with a timestamp,
but is actually an 128 bit version number. When you dive into it, you
can see that it is updated from 1 to 2,3,4,5,etc. every time the row
is updated.
So about a year ago I could do this in AR (the database column named
Version is of sql-type timestamp to make the confusion complete):

[Castle.ActiveRecord 1.0.3.5619 (10-5-2009)]

        [Version("Version", Type = "binary", Generated = "always",
UnsavedValue = null)]
        public virtual byte[] Version
        {
            get {
                return _version;
            }
            set {
                _version = value;
            }
        }

This is a one-to-one translation from a post by Ayende describing an
NHibernate mapping:

[http://ayende.com/Blog/archive/2009/04/15/nhibernate-mapping-
concurrency.aspx]

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

So what is my problem: in recent versions of ActiveRecord, the
Generated="always" is gone. So my code is not working any more. I
checked Google and release notes and even the AR source, but I could
not find anything on this. What did happen?

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to