Tuesday, January 6

NHibernate 1.2 to 2.0 Breaking Changes

With the release of NHibernate 2.0.0.Alpha1, there are also a few breaking changes:

Compile time

Changed NHibernate.Expression namespace to NHibernate.Criterion

Changed NHiberante.Property namespace to NHiberante.Properties

IInterceptor changed to match the Hibernate 3.2 Interceptor

INamingStrategy interface changed

Changes to IType, IEntityPersister, IVersionType

IBatcher interface change

Initialization time

section is ignored, using section (note that they have different XML formats)

Configuration values are no longer prefixed by "hibernate.", if before you would specify "hibernate.dialect", now you specify just "dialect"

Will perform validation on all named queries at initialization time, and throw exception if any is not valid.

Run time

SaveOrUpdateCopy() returns a new instance of the entity without change the original.

No AutoFlush outside a transaction - Database transactions are never optional, all communication with a database has to occur inside a transaction, no matter if you read or write data.

NHibernate will return long for count(*) queries on SQL Server

must contain parenthesis when needed

No comments:

Post a Comment