The ObjectMapper .NET Project

Official blog of the AdFactum ObjectMapper .NET

New Release – ObjectMapper .NET 1.50.1312.0

Posted by Gerhard Stephan on February 13th, 2007

Due to the amount of changes within the current version it’s time to increase the release number to 1.50.

First of all the AdFactum ObjectMapper .NET can now handle database functions on properties. Thus enables you to execute database functions when a new object will be inserted, updated or selected. I originally implemented the database function support to read an Oracle sequence number when a new object will be inserted. But it can also be used to set the creation date automatically.

        /// <summary>

        /// Gets or sets the creation.

        /// </summary>

        /// <value>The creation.</value>

        [InsertFunction("GETDATE()")]

        public DateTime Creation

        {

            get { return creation; }

            set { creation = value; }

        }

 

Furthermore I optimized the way the ObjectMapper .NET writes queries that starts with an "*". The old version of the ObjectMapper .NET put the complete value into a parameter. But that’s not very smart, because the database can’t optimize the query. So, whenever a query starts with a "*" the ObjectMapper .NET will output a built up value like "%" & P1. Thus allows the database optimizer to speed up the query.

Also I added a new tutorial that shows how to use the ObjectMapper .NET within a multithreaded environment. As soon I have time I’m going to write an Article about that Tutorial 04 and post it to that blog.

The last enhancement is a little bit hidden in the meta model of the ObjectMapper .NET. Because we needed to store data changes in our current project, I extended the Meta Model of the Object Mapper .NET in order to store the old property values. If you want to store your data changes, you have to inherit an existing persister and overwrite the methods "Update", "Insert" or "Delete". The parameter "Fields" knows the old and new values which enables you to write a change log of your properties.

Additionally I fixed some bugs within the old version:

  • The AccessPersister is now multi threading compatible.
  • Sometimes the XML Persister threw an NullPointerException. This bug has been fixed.
  • I completed the internal meta model. In some cases the AdFactum ObjectMapper .NET did not own a complete meta model of the data.

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>