Released on 20 th of July 2006 (build: 22.214.171.124)
Genome 3.0 provides major enhancements that utilise new features provided by the Microsoft .NET 2.0 Framework. Genome 3.0 is therefore only available for .NET 2.0. To use Genome with .NET 1.1, the latest release of Genome 2.x can be downloaded from the Genome website.
Genome 3.0 entails some breaking changes when upgrading from Genome 2.x. However, change efforts should be minimal when upgrading from existing Genome 2.x projects.
The current release of Genome 3.0 is a beta release. We are collecting feedback from users and will provide subsequent release candidates in short cycles of two to three weeks.
The new generic Set<T> extends the existing Set class, which has been retained for backwards compatibility. Set<T> provides strongly typed access to persistent objects retrieved from the database.
Minor changes have been applied to the interface of Set/Set<T>, such as renaming Set.Filter to Set.Where to match the upcoming LINQ syntax. Old interface members have been retained and marked as deprecated where possible. For a complete list of changes, please see the “API Changes” chapter below.
The DataDomain class has been extended with the following new methods to retrieve strongly typed results:
The Database Reverse Engineering Wizard (DBREW) has been extended to generate class models using Set<T> when desired.
Collection<T> extends Set<T> to provide implicit collection handling. While Set<T> represents a query to enumerate all elements of a set specified through an arbitrary OQL, Collection<T> is further specialised to deal with 1:n and n:m relations in a more convenient manner:
- Collection<T> provides methods for adding and removing elements of the collection which set corresponding reference fields in the associated objects (1:n relation) or create and delete the corresponding association elements (n:m relation).
- Collection contents are consistent even in uncommitted LocalContext (Long Running Transaction). Changes to the collection take effect without re-querying the database.
- Collections can be ordered. Ordering is kept when adding and removing elements to the collection.
- Collection elements are cached once they are accessed (enumeration, Count, etc.). Subsequent access to collection elements is served from cache, which is held consistent with changes performed to the collection (directly through add/remove operations on the collection as well as by modifying object references ).
- Collections can be used in OQL queries like normal sets.
- Further query transformations (such as filtering, projecting, ordering, etc.) can be applied to collections. The result will be a Set<T>. Uncommitted changes in the LocalContext (Long Running Transaction) might not be reflected in the transformed Set<T>.
- For n:m relations, the association class can be managed implicitly without appearing in the business model.
PreCaching can be applied to Collection<T> like for Set<T>.
The Database Reverse Engineering Wizard (DBREW) can be instructed to generate Collection<T> instead of Set<T> for relations found in the database.
Genome now supports persistent properties with the new .NET 2.0 nullable types. Lifted operators of Nullable<T> (such as the standard arithmetical operators (+, -, etc.)) are mapped as well.
Nullable<T> can also be used for Wire Object Protocol (WOP) Data Transfer Objects.
The Database Reverse Engineering Wizard (DBREW) can be configured to generate Nullable<T> in the object model.
With the Set<T> extensions, ExternalQuerySet became obsolete. To create Set or Set<T> results with external SQL queries as a data source, the ExternalQuery.Create() and ExternalQuery.Create<T>() methods can be used.
External SQL queries that do not return any result rows can be executed using ExternalQuery.ExecuteNonQuery().
GetRange() available in OQL
GetRange(0,n) can be now used from within OQL and will be translated into a TOP n statement in SQL. The first item of a set can now be properly selected using “someSet.GetRange(0,1).ToObject()”.
The following changes have been made to align namespaces and other type identifiers with the Genome product name:
- TechTalk.Dal.* namespaces have been renamed to TechTalk.Genome.*
- TechTalk.Dal.dll and TechTalk.Dal.*.dll assemblies have been renamed to TechTalk.Genome.dll and TechTalk.Genome.*.dll
- DalException has been renamed to GenomeException
Some API changes have been introduced with Genome 3.0 and need to be considered when upgrading projects from Genome 2.x. For some changes, a deprecated version of the old infrastructure is retained in Genome 3.0. Please see the "What’s New" section in Genome 3.0 for more information about breaking changes.
Upgrading existing projects
The "What's New" section in Genome 3.0 outlines the steps necessary to upgrade existing Genome 2.x projects to Genome 3.0.
Documentation is still under construction and will be finalised in an upcoming release. All samples have already been upgraded to demonstrate usage of the new Genome 3.0 features.