2

Sept

NHibernate 2.0

Marek Tihkan

Mõni aeg tagasi tuli välja NHibernate 2.0, mida on võimalik alla laadida siit ning dokumentatsiooni selle kohta võib leida NHibernate wikist.

New & Exciting features:

  • CriteriaTransformer – allows to clone and transform ICriteria and DetachedCriteria.
  • Criteria inspection – improved the ability to see what it going on there, previously was write only.
  • Multi Criteria – the companion to Multi Query
  • <join> tables – allowing to compose a single entity from several tables.
  • Events, Actions and Listeners – this is a very big feature, and it extends the way you can work with NHibernate in very deep ways. Think of it like the interceptor++.
  • Persistence Context – this is important for the internal NHibernate structure, it makes it much close to the Hibernate one, which in turn make it easier to share features.
  • list-index – adding the ability to specify the base index of a list, instead of always going from 0
  • property-ref – allow to have an association that is not based on the primary key on an entity
  • Stateless Session – easier way to work with bulk data, without needing the first level cache
  • Cache Mode – better control on how the session will work with the second level cache.
  • Statistics feature – useful for tests, and to see exactly what NHibernate is doing.
  • Query plan – NHibernate will parse named queries in advance, which allows to do nice things, like provide tool support for them, beyond the perf implications
  • Update IInterceptor – now supports H3.2 methods and capabilities
  • <union-subclass> – like <join-subclass>, but with union instead of joins

[Allikas]

Kurvastusega peab tõdema, et LINQ to NHibernate projekt 2.0 ei tulnud. Praegu on see planeeritud 2.1 versiooni, mis tähendab seda, et kes suur LINQ fanaatik on, see peab ootama :P

Patrick Smacchia tegi NDepend‘iga võrdluse NHibernate 1.2.1 ja 2.0 vahel.

Kellele tundub, et mapping failide kirjutamine on äärmiselt tülikas, siis võib abi olla ka järgnevast projektist: Fluent NHibernate. Selle tumedam pool on see, et nüüd 1 klassi ja XML-i asemel kirjutad 2 klassi.

Head uudistamist ja arendamist!

  • Share/Bookmark

KATEGOORIAD » .NET

SILDID » ,

Lisa kommentaar

  • * Kuvatakse kommentaari juures
  • * Ei publitseerita