Learning NHibernate

NHibernate is a port of Hibernate Core for Java to the .NET Framework. It handles persisting plain .NET objects to and from an underlying relational database. Given an XML description of your entities and relationships, NHibernate automatically generates SQL for loading and storing the objects. Optionally, you can describe your mapping metadata with attributes in your source code.

Update 18-11-2008, well it turs out there infect is a NHibernate 2.0documentation here:

http://nhforge.org/doc/nh/en/index.html

 

A very good place to start is here:

http://www.hibernate.org/hib_docs/v3/reference/en-US/html/

Properties

Chapter 5 explains setting up properties in the mapping file, tags and attributes.

http://www.hibernate.org/hib_docs/v3/reference/en-US/html/mapping.html

Collections

Chapter 6 is about collections and lists

http://www.hibernate.org/hib_docs/v3/reference/en-US/html/collections.html

Many-to-many relations

Handling many-to-many relations can be difficult, especially when it comes to cascading and data integrity. This blog post explains one way of handling it.

http://codebetter.com/blogs/peter.van.ooijen/archive/2008/05/29/nhibernate-many-to-many-collections-or-mapping-is-not-one-table-one-class.aspx

About Mikkel Ovesen

I am a .NET developer, primarily developing apps for the web. I have been working with the web since 1997. I like open-source software and burgers ;)
This entry was posted in Development, Software and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>