Geeks With Blogs
Bob Palmer's Developer Blog .NET, SQL, and Silverlight Development

In this NHibernate tutorial, I'll be digging into the ID tag and Generator classes.  I had originally planned on finishing up a series on relationships (parent/child, etc.) but felt this would be an interesting topic for folks, and I also wanted to start integrating some of the current NHibernate reference.

Since this article also includes some reference sections (and since I have not had a chance to check for every possible parameter value), I used the current reference as a baseline, and would welcome any feedback or technical updates that I can incorporate.

You can find the entire article up on Google Docs at this link:

http://docs.google.com/Doc?id=dg3z7qxv_24f3ch2rf7

As always, feedback, suggestions, and technical corrections are greatly appreciated!

Enjoy!
- Bob

Posted on Friday, April 30, 2010 9:14 PM | Back to top


Comments on this post: Working with Primary Keys and Generators - Quickstart with NHibernate (Part 4)

# re: Working with Primary Keys and Generators - Quickstart with NHibernate (Part 4)
Requesting Gravatar...
Hi Bob!

Thank you very much for these NHibernate tutorials. I have never used NHibernate before, and I find your tutorials clear, simple, easy to follow, well structured, and well explained. So thanks a lot!

I have noticed 2 very small typos:
(1) In the section "The Generator Tag", the first sentence seems to be missing the word "to" ==> "The <generator> child element is used [to] tell NHibernate ..."

(2) In the section "Creating a Custom Generator Class", in the second paragraph, the word "is" was typed twice ==> "..., but is is being used here purely for illustrative purposes."

Once again, thanks for these great tutorials. Very good work!

- Sylvain

Left by Sylvain Bellemare on Jun 22, 2010 12:16 PM

# re: Working with Primary Keys and Generators - Quickstart with NHibernate (Part 4)
Requesting Gravatar...
Bob,

This is a great series of tutorials.

Thanks!

Jack
Left by Jack on Jul 28, 2010 8:50 PM

# re: Working with Primary Keys and Generators - Quickstart with NHibernate (Part 4)
Requesting Gravatar...
Hi Bob,

You have made the best NHibernate tutorial I could found in the net.

Thanks a lot for your work,
Artem.
Left by Artem on Dec 01, 2010 8:25 AM

# re: Working with Primary Keys and Generators - Quickstart with NHibernate (Part 4)
Requesting Gravatar...
hello
i get the following exception when i follow this tutorial

{"Could not interpret id generator strategy: ACME.Data.ProductKey, ACME.Data"}

Would anyone tell me that how to solve this problem please?
Left by Fred on Mar 15, 2011 3:32 PM

# re: Working with Primary Keys and Generators - Quickstart with NHibernate (Part 4)
Requesting Gravatar...
Dear Fred,

You must put ProductKey class inside ACME.Data namespace. I think you put it inside class ProductRepository, and you got error.
Left by vql on Oct 14, 2011 9:59 PM

Your comment:
 (will show your gravatar)


Copyright © BobPalmer | Powered by: GeeksWithBlogs.net