Hello,
I'm working on getting started with NHibernate on a large scale project (have worked with it in small-scale before), and am digging into the issue of managing relationships... specifically, what best practices are out there for doing so?
Example: The classic: you have a Blog and Comments, the blog points to (0-n) comments, each comment in the collection points back to the blog {0,1}.
Out-of-the box it seems it's up to you to not shoot yourself in the foot (by mis-matching the child object relationships, for example). We're hoping for a better solution to build upon...
One option I've found is making the collection private and providing accessor/mutation methods for it. The fixup can then be done in those methods.
But I'm wondering if a better solution is out there-- something like a "FixupCollection" (used in the Entity Framework's POCO template)
Also, Ayende mentions a FixupCollection of his own (ADO.Net Entity Framework Round II post, can't find any code though): "I wrote my own collection classes for NHibernate that will do the fixups for the relationships".
Thanks for any info!