News, examples, tips, ideas and plans.
Thoughts around ORM, .NET and SQL databases.

Saturday, May 12, 2012

DataObjects.Net 4.5.3 RC and 4.4.3 RC3

DataObjects.Net 4.5.3 RC and 4.4.3 RC3 are available.

Both contain the same fixes that are listed below:
  • Fixed index duplication under certain scenarios (see this for details)
  • Fixed error about duplicate index name under certain scenarios (see this for details)
  • Added SessionOptions.SuppressRollbackExceptions

Rollback exceptions suppression

Option SessionOptions.SuppressRollbackExceptions tells DataObjects.Net to catch (and log) any exception that occurred during rollback. Rollback typically occurs when some exception is already thrown. So any exception during rollback will cause original exception to be lost. New option could be used to prevent such behaviour.

Migration path

No special migration is required.

Thursday, May 10, 2012

DataObjects.Net 4.5.2

DataObjects.Net 4.5.2 is released.

This is tiny update that fixes database schema incompatibility between 4.4.x and 4.5.x versions.

If you are migrating from 4.4 this is highly recommended update.

You can download installer and zip at downloads area.  NuGet packages are available as well.

Migration path

No special migration required.

Saturday, May 05, 2012

DataObjects.Net 4.5.1 is out

We are releasing DataObjects.Net 4.5.1. This is minor update, it contains changes, described in details in the previous announcements:
There are also small fixes in this version:
  • Fixed bug with NullReferenceException in rare cases during struct materialization
  • Added DomainConfiguration.SchemaSyncExceptionFormat property for precise control over the correspondent exception format
DataObjects.Net 4.5.1 is available for download from the website and as NuGet packages.

Wednesday, May 02, 2012

DataObjects.Net 4.5.1 RC2

DataObjects.Net 4.5.1 RC2 is available.

The following improvements are included:
  • Fixed missing associations under certain conditions (like in 4.4.3 RC2)
  • Fixed incorrect OnOwnerRemove=Clear for non-paired associations (like in 4.4.3 RC2)
  • NuGet package for Firebird provider is now available
  • NuGet package for PostgreSQL provider is now available with some work around.
  • Fixed LINQ translator regression in DateTime operations that occurred in 4.5.1 RC
  • More friendly names are displayed for NuGet packages (i.e. DataObjects.Net instead of Xtensive.Orm for main package)
Binaries and installer could be downloaded here. NuGet packages are available as well.

Workaround for PostgreSQL provider package

NuGet package for PostgreSQL is now available as well. However it does not work out of the box. DataObjects.Net is built against Npgsql 2.0.11.92, however only 2.0.11.0 is available at NuGet.

NuGet package manager is aware of such situations and tries to make a work around by adding binding redirection where required.

If you add  Xtensive.Orm.PostgreSql package to your project, you might see binding redirection is added to app.config/web.config (I've added line breaks to fit into blog width)

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity
      name="Npgsql"
      publicKeyToken="5d8b90d52f46fda7"
      culture="neutral" />
    <bindingRedirect
      oldVersion="0.0.0.0-2.0.11.0"
      newVersion="2.0.11.0" />
  </dependentAssembly>
</assemblyBinding>

This does not work unfortunately, because Xtensive.Orm.PostgreSql assembly depends on a version that is newer than available version. It seems that NuGet tools only consider the reverse scenario, where dependent assembly is built against older version.

To solve this issue, you'll need to change old version range to include newer versions as well:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity
      name="Npgsql"
      publicKeyToken="5d8b90d52f46fda7"
      culture="neutral" />
    <bindingRedirect
      oldVersion="0.0.0.0-2.0.11.9999"
      newVersion="2.0.11.0" />
  </dependentAssembly>
</assemblyBinding>

Migration path

No special migration is required. This version is source and binary compatible with 4.5.0 and 4.5.1 RC.

DataObjects.Net 4.4.3 RC2

Even DO.Net 4.5 is available we continue to supply fixes for previous version.

This update has 5 improvements over DO.Net 4.4.3 RC:
  • Fixed double release of resources in Session.Dispose()
  • PostSharp is updated to version 2.1.6.13
  • Fixed incorrect OnOwnerRemove=OnRemoveAction.Clear for non-paired associations
  • Fixed NullReferenceException that might occur when parsing error from SQL Server
  • Fixed missing associations under certain conditions

Migration path

This is bug-fix only release. It does not require source code changes. Due to upgraded PostSharp it is recommended to recompile assemblies with persistent types.

Binaries .rar can be downloaded here.