Is there any other site for studying critieria queries like http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/querycriteria.html
Knol by Fabio Maulo
Some blog posts by Ayende
Operator Overloading
Multi Queries
One of the most helpful resources for me to learn more about NHibernate's Criteria API was definitely the 'Summer of NHibernate' screencast series (see here). Session 2 will show you how powerful it is.
The guy that created those series seriously rocks.
The nhibernate.info website has lot of docs.
Related
I need suggestion for rating system implementation. I have Blogs, Discussions, Comments in my system, so each member can make +1 to current blog post or discussion entry, comment etc. I know that there is acts_as_ratable, but this is no what I need.
Any suggestions, what can I use to keep my code DRY?
P.S - I know it can be handled using polymorphic associations, but I'm searching for basic solution to integrate.
Thanks in advance!
This is a perfect case for Rails' polymorphic associations -- several different types are "ratable".
Good doc on this here:
http://guides.rubyonrails.org/association_basics.html#polymorphic-associations
And great screencast here:
http://railscasts.com/episodes/154-polymorphic-association
Or the concepts/best practices used there are now deprecated? I'm just starting to use NHibernate and I'm having a hard time finding good real life samples.
http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx
As you can see for the dates the author (Billy McCafferty) didn't update it in a long time. There is so much more on the NHibernate ground now but most of the concepts in that article still apply.
You may want to checkout additional sources like:
http://nhforge.org/
http://fabiomaulo.blogspot.com/
http://fluentnhibernate.org/
If you are using NHibernate in web applications, Billy McCafferty built an excelent framework on top of NHibernate and ASP.net MVC. http://www.sharparchitecture.net/
And this open source app is an awesome sample: http://whocanhelpme.codeplex.com/
I'm still quite new to NHibernate and most of it I'm getting to grips with. One area that I'm really lacking a proper understanding of though is querying (at least when it comes to anything reasonably complex).
I learn best by example, but I feel that I haven't really been able to find all that many in depth querying examples on the web. There are there are quite a few of course - but there are many different techniques and approaches, and most of the examples seem to gloss over the details.
(For instance in the official nhibernate documentation, the ICriteria explanation comprises 4 sentences!)
Maybe I just haven't looked well enough? ;) Does anyone know of any good resources (on the web) with lots of query examples? (Both HQL and ICriteria prefferably).
StackOverflow. I'm serious - go into Hibernate and NHibernate tags and search for Criteria and / or HQL. There are tons of questions / answers. I know because I wrote a lot of them :-)
NHibernate manual sections on HQL and Criteria have quite a few examples as well.
Finally, you can always post a question if you're having trouble with something. When / if you do, be aware that posting appropriate mappings / classes / tables makes it a lot easier to understand / answer any question related to Hibernate queries.
Aside from the language used (Java, C#, etc.), are articles and books for Hibernate equally good for nHibernate? Now that I am learning I want to research but I don't want to waste time on the wrong information.
Thank you.
I have a very basic CRUD database project for learning if anyone has any all in one article.
EDIT: I bought the book nHibernate in Action, but I also found this website with helpful nHibernate videos: http://www.summerofnhibernate.com/
It would indeed, that said a friend of mine has just finished writing NHibernate in Action and I HIGHLY recommend it. As for web references I suggest the best practices article by Billy MCatherty, and of course the NHibernate documentation.
Absolutely. I would recommend you Hibernate in Action.
I have googled and looked around does anyone know of any hidden gems out there that is not in first couple pages of a google search....
The wiki is your best bet. I've had a few Fluent NHibernate posts on my blog, but most of that content is mirrored on the wiki anyway.
I appreciate this tutorial, perhaps can help you:
http://nhforge.org/blogs/nhibernate/archive/2008/09/17/value-objects.aspx
The author explain the concept of value object, using them like components.
That helped me a lot maybe you should try.
Here is a 4-part blog posting about FluentNHibernate. Not sure exactly what you're looking for, but then you didn't say either. ;)
http://www.dreamincode.net/forums/topic/161638-fluent-nhibernate-tutorial/
Fluent Nhibernate has a wiki, have you checked it out?.
This video tutorial added to youtube.com on 10/5/2011 got me up in running in about 30 minutes.
Fluent NHibernate Tutorial
Update: It's been a few months, but if you need advanced mapping and don't mind 3rd party tools, use DevArt's Entity Developer tool which creates all of your entities and mappings for up to 10 tables/entities for free. The source code for the entity mappings is readily available for you to learn from. If you look at it you can learn a lot. http://www.devart.com/entitydeveloper/
I like NHibernate 3.0 tutorial with Fluent Nhibernate and LINQ 2 NHibernate
The GitHub project page has got all the basic examples you need: https://github.com/jagregory/fluent-nhibernate/wiki/Getting-started