The ObjectMapper .NET Project

Official blog of the AdFactum ObjectMapper .NET

Archive for the 'Releases' Category

New Release - AdFactum ObjectMapper .NET 2.3.3013.0

Posted by Gerhard Stephan on 13th July 2008

This release covers a lot of smaller and bigger bug fixes for the Microsoft SQL Server 2000 and 2005.

Some Statements could not be executed for the Microsoft SQL Server 2000 by the SqlFile class, because the SQLs that have been executed all ends with a semicolon. Microsoft SQL Server 2005 doesn’t care about, but Microsoft SQL Server 2000 ends up with a failure. This bug has been fixed by removing the semicolon at the end for all databases but Oracle.

The integration check for Microsoft Access failed when a field had a property length greater than 255. Thus forces the Microsoft Access Persister to use a MEMO field, but the integration check did not care about that and throwed a failure, because the max size of a memo field differed to the max size of an integer value. This bug has been fixed by updating the integration check which now takes care to that issue.

Another bug was that the SqlTracer did not take care of the formatting of SQL Statements for the Microsoft Sql Server. It was not everytime possible to use the trace output as a direct input for SQL queries used by the Microsoft SQL Server. This problem has been fixed by changing the parameter formatting for the Microsoft SQL Server.

Furthermore there had been a failure, if the SQL Tracer outputs SQL Statements which uses a parameter more than one time. As a result the second parameter use haven’t been replaced with the concret value by the SQL Tracer. This bug has also been fixed now.

The fith bug has been fixed for the Microsoft SQL Server 2000. The Microsoft SQL Server 2000 has problems to parse a select statement like SELECT TOP(x). The select statement has been changed so that it fits the needs for the Microsoft SQL Server 2000.

If you find some more bugs, please don’t hesitate to report them into the forum of the ObjectMapper .NET.

Best regards
Gerhard Stephan

1 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 5 (1 votes, average: 5 out of 5)
Loading ... Loading ...

Posted in Releases | 1 Comment »

New Release - AdFactum ObjectMapper .NET 2.3.2619.0

Posted by Gerhard Stephan on 19th March 2008

This Release is a pure bug fixing Realease. It covers three major bug fixes.

At first, it fixes a memory leak that occures when calling the Method "BaseCache.ClearAllCaches". Because this is not obvious for all users, I have to explain that this method has been called every time the ObjectMapper class has been initialized with a version information greater than zero.

The second fix is a multithreading bug that causes the mapper to throw unmotivated Exceptions, like "NoPrimaryKeyFound" Exception and "CollectionHasBeenModified" Exception. But this only occured when using the ObjectMapper .NET in a strongly multithreaded environment.

The last fix, fixed the update and delete sql statements of dictionary types (e.g. SortedList and Hashtable). Due to that the link table had a wrong primary key definition and that caused the update of the link table to fail.

Hope you enjoy the new version.

Cheers
- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 2.3.2607.0

Posted by Gerhard Stephan on 7th March 2008

Today, the AdFactum ObjectMapper .NET reaches the next evolution level - hmm - I mean: the next release. But without joking, it’s a big step to a full integrated LINQ support and a big step further to complete the base functionality of the AdFactum ObjectMapper .NET.

First I implemented the base aggregation functions like Min, Max, First, Last, Sum and Count and grouping functionality with using the GroupBy Clause. This functionality can be used with projection classes or directly using the new Linq Syntax. The only thing that is still missing, is the Having Clause which caused me a lot of headache. But I’m confident that I can implement that feature in the next release.

As a second new feature, the AdFactum ObjectMapper .NET now offers Unicode support for Oracle and Microsoft SQL Server. To use this new feature, the properties must be tagged with an [Unicode] attribute.

Hope you enjoy the new version.

Cheers
- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 2.2.2519.0

Posted by Gerhard Stephan on 19th February 2008

This release covers two bug fixes. The first one fixes a bug within the projection query engine, which prevents selecting a projection multiple times due to a null pointer exception that has been thrown by the ObjectMapper .NET. The second one fixes the short name generation in the repository part of the ObjectMapper .NET.

I think that is the last bug fix release before the next bigger release introduces many enhancements to the AdFactum ObjectMapper .NET.

For the record:

  • It’s planned to support the aggregation functions, like min(), max(), sum() and so on.
  • It’s planned to support 1 to many relations between parent and child, instead of only supporting the n:m relations.

So, I hope you enjoy the calm before the storm (before the next release ;) and wish you a successfull week.

Cheers
- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 2.2.2430.0

Posted by Gerhard Stephan on 30th January 2008

This version contains two new changes.

The first, is included because of the backward compatibility to earlier versions where the AdFactum ObjectMapper .NET did only support GUID types as Primary Keys. To satisfy our customers which upgraded to the new version the last days, I included a backward compatibility modus. The rule: If no primary key is defined within an interface, assume that the primary key must be a GUID.

The second new feature is a new overload to the ExecuteScript Method, which now takes an OnSqlFileFailed Delegate to handle exceptions thrown when executing the sql file.

Hope you enjoy the new version.
Cheers

- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 2.2.2418.0

Posted by Gerhard Stephan on 18th January 2008

Four days after the last release I have to publish a small bug fix for all oracle users.

The last change, adding the ROWID to all pageselects, did not work, when querying a database view. And that’s correct, because a database view does not offer a ROWID. So what did I change? It’s now possible to define, that a .NET class is mapped to a database view. This can be done by using the new attribute called "View", instead of using the attribute "Table".

As a second bugfix I changed WithClause. Using the WithClause in prior versions could force a cartesian product, because all tables of the With-Clause have been exposed to the Parent SQL, which is an unwanted behaviour.

Hoping that this will be the last hotfix for this month I wish you a great weekend.

Cheers
- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 2.1.2414.0

Posted by Gerhard Stephan on 14th January 2008

Today I present the first release of the AdFactum ObjectMapper .NET within the new year. So what does it cover? This release is one of the big one and covers a lot of minor changes and one or two bigger issues.

First of all I added a new persister especially for the old Sql Server 2000 version, which does not support the analysis functions used by the paging algorithm. As another big new feature, I added a "DeleteRecursive" method which allows to delete object trees by using a given hierarchy level.

The minor features are less impressive, but important to know:  Many method signatures have changed from using the old collections to the new generic collections. That makes it more easy to use this methods. Furthermore I changed a lot of code fragments so that they are FxCop conform and I reduced duplicated code fragments.

Following bugs have been fixed:

When using the Oracle Paging algorithm there has been a bug when paging a sorted list with identical sort values. Oracle retrieved differend row data. To solve this issue the ROWID has now been added as an additional sorting column.

The SQL Persister for Windows CE is now able to using SelectDistinct (which causes an error in earlier versions). Virtual Links are now correctly quoted, so that reserved words can  be used for it and SelectIds on XmlPersister will now work even if the target object is not defined within the XML file.

So that’s a lot stuff. Hope that everything works for your suffiency. If not, don’t hesitate to write within the forum or answer to this blog entry.

Wish you a great new year.
Cheers

- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 2.0.2307.0

Posted by Gerhard Stephan on 7th December 2007

This version covers one new query condition, with that you can use the Sql  "with clause" sub query replacement.  That feature gives you a powerful optimization feature, if you have many sub selects (SubSelect) within your sql query. In best case, these sub selects can be reduced to one, when using the "with clause" feature.

More information about using the withclause can be found here: http://blog.objectmapper.net/2007/12/07/using-the-sql-99-with-clause/

So, I wish you lot of fun with the new version.
Cheers

- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 2.0.2129.0

Posted by Gerhard Stephan on 30th October 2007

Today I’m proud to release version 2.0 of the AdFactum ObjectMapper .NET. This major release covers new key features like a first LINQ implementation, new projection classes and several bug fixes regarding the XML persister.

First of all, the ObjectMapper .NET does now understand the basic LINQ syntax. Please keep in mind that this is a first implementation and that it does not cover the complete functionality of LINQ. But it’s a first step. Be sure that the next release of the ObjectMapper .NET will cover a lot more LINQ features than it does today.

Linq Support

var orders = mapper.Query<Order>();

var customers = mapper.Query<Customer>();

 

var mexicanOrders =

from order in orders

join customer in customers on order.Customer equals customer

where customer.Country == "Mexico"

select order;

 

You’ll find several LINQ examples within the NUnit Test Cases.  

Anonymous Types

Because the dotNet Framework 3.0 does now support anonymous types, the AdFactum ObjectMapper .NET had to support these types in order to be LINQ conform.  Have a look at the following LINQ query.

var mexicanOrders =
      from order in orders
      join customer in customers on order.Customer equals customer
      where customer.Country == "Mexico"
           
select new {
                  customer.CompanyName,
                  customer.ContactName,
                  order.OrderDate,
                  order.ShipName };

 

The result of this query is a list with objects of an anonymous type. The anonymous type has four properties (CompanyName, ContactName, OrderDate and ShipName).

Projection class

The support of anonymous types leads to a new feature of the AdFactum ObjectMapper .NET. It was a absolute necessity to add an equal feature to the non LINQ version. That new feature has been called projection classes. A projection class is a class where the properties are used to mirror the results of multiple sources into one projection. 

     /// <summary>
    /// Class used for projections
    /// A class that is used for projects must not be a ValueObject!
    /// </summary>

    public class OrderCustomer
    {
        private string companyName;
        private string contactName;
        private string shipName;

        /// <summary>
        /// Gets or sets the company name.
        /// </summary>
        /// <value>The company name.</value>
        [ProjectOntoProperty(typeof(Customer), "CompanyName")]
        public int CompanyName
        {
            get { return companyName; }
            set { companyName = value;  }
        }

        /// <summary>
        /// Gets or sets the contact name.
        /// </summary>
        /// <value>The contact name.</value>
        [ProjectOntoProperty(typeof(Customer), "ContactName")]
        public string ContactName
        {
            get { return contactName; }
            set { contactName = value; }
        }

        /// <summary>
        /// Gets or sets the ship name.
        /// </summary>
        /// <value>The name of the ship.</value>
        [ProjectOntoProperty(typeof(Order), "ShipName")]
        public string ShipName
        {
            get { return shipName; }
            set { shipName = value; }
        }
    }

EXAMPLE:

List<OrderCustomer> names = new List<OrderCustomer>(
      new ListAdapter<OrderCustomer>(
            mapper.Select(typeof (OrderCustomer),
            new Join(typeof (Order), “Customer”, typeof (Customer))));

 

Support of .NET 2003 closed

Because of all these new features and changes it wasn’t possible to keep the .NET 2003 support for the AdFactum ObjectMapper .NET. I hope that not many users are still working with .NET 2003, but there had not been an other solution. Due to this change, it’s necessary to de-install the ObjectMapper .NET first, before installing the new version. 

XML Persister

The Xml Persister has been greatly reworked. It’s now again possible to store object trees into an XML File. I say "again", because this features has been broken in one of the last versions of the AdFactum ObjectMapper .NET.  

Minor Bug Fixes

Last but not least, there have been many minor bug fixes.

  1. There were failures when defining primary keys other than already defined in the base classes, like ValueObject or AutoIncValueObject.
  2. The Access Persister did not throw the correct error number the time a failure occured. This forced the AccessPersister to execute the SQL multiple times before throwing an exception.
  3. Furthermore I implemented a new caching strategy which reduced the amount of cache access significantly.

And a lot of more minor bug fixes / changes that are not counted.

Hope you enjoy the new version.

Cheers
- Gerhard 

kick it on DotNetKicks.com

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »

New Release - AdFactum ObjectMapper .NET 1.90.1917.0

Posted by Gerhard Stephan on 17th September 2007

The new release of the AdFactum ObjectMapper .NET covers several enhancements that have been discussed in other thread within this blog.

First of all the OBM (ObjectMapper .NET Manager Class) has been included in the current release. That means that you don’t have to implement multi threading functionality by your own. You can simple use the OBM helper class. The original idea of the OBM has been explained in Tutorial 4. The only difference is, that the signature of the Method CreateMapper has been changed.

public static ObjectMapper CreateMapper(DatabaseConnection connection)

The DatabaseConnection Property specifies the Database to that the ObjectMapper .NET connects to. I’m going to write further blog entries in order to explain the new OBM class.

Furthermore I replaced the class BaseFactory with the new UniversalFactory. This class covers the the changes from the blog entry "A Final performance boost" which unleash incredible performance when loading many objects. To enable this performance boost your entities have to implement the ICreateObject interface.

    public interface ICreateObject

    {

        /// <summary>

        /// Creates the new object.

        /// </summary>

        /// <returns></returns>

        IValueObject CreateNewObject();

    }

 

As third improvement I re-worked all classes that implements the IDisposable interface in order to use the correct IDisposable Pattern.

Last but not least, I fixed the bug "[ 1793851 ] OrderBy does not generate parenthesis". The problem was that SQL Statements misses parenthesis within the ORDER BY clause. Which is very bad if you are using reserved words like INDEX.

That’s all for now.
Cheers

- Gerhard

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Releases | No Comments »