-
[Update 6/11/08 - To see an example of this in action, read the introduction of S#arp Architecture .] I've been quiet lately as I've been a very busy bee preparing the inner workings of the sequel to my NHibernate Best Practices article. In the next installment, I'll be discussing in detail...
-
From the time that I started learning about C# 3.0 and LINQ I've had a number of interesting ideas spinning about in my head. Last week I finally got some free time to work them out. I'm pretty excited about the results. Essentially I wanted a way to make queries work better within...
-
An AGGREGATE is a cluster of associated objects that we treat as a unit for the purpose of data changes. Each AGGREGATE has a root and a boundary. The boundary defines what is inside the AGGREGATE. Domain-Driven Design, Eric Evans This pattern is at the root of decision making while breathing life into...
-
Just an FYI. If you are using NHibernate and have objects that are using the new Automatic Properties feature of .Net 3.5 make sure that your NHibernate .hbm file does not have 'default-access="field.camelcase-underscore"' in the hibernate-mapping node. If you have this attribute set...
-
[ Update on Dec. 17, 2007: Removed extraneous CustomCollectionsPro.Core.CollectionInterfaces namespace and fixed a bug in CustomCollectionsPro.Data.Collections.PersistentProducts: the second parameter of the PersistentProducts constructor must take a generic IList<Product> instead of the Products...
-
Download the sample code for this post. In part one of this three part series, I offered what we’d ideally like when using NHibernate, or any ORM for that matter, with custom collections in the domain layer. To reiterate, the ORM should have as little impact as possible on how custom collections...
-
When people speak of the object-relational impedance mismatch , they usually talk about the differences between structure, the lack of behavior in relational databases, and the complexities that mapping abstractions present. A disadvantage which receives less attention is the impact that the impedance...
-
I'd like give a big thanks to Patrick Smacchia for offering me a free license for NDepend , a code analysis tool. I've spent the past couple days experimenting, watching tutorial videos , reading his articles, and running the tool against my work project and also NHibernate , for which I am an...
-
I revisited porting the builtin Hbm2Ddl task from Nant to MSBuild. It's passing tests on my end and I'll take on a test drive tonight. Nothing real interesting. It is forced to copy the target assemblies into the runtime bin and then cleanup on Dispose(). NHibernate couldn't find the assemblies...
-
If you've tried to pass NHibernate objects over the wire using a webservice before, you know how painful it can be. But what about WCF? Can it ease your pain? Well, yes, of course it can. This wouldn't be a very interesting post if the answer was no. There are three main issues that needed to...
-
I've updated the NHibernate blog example code to include a custom profile provider. This provider stores the profile information using the XML data type in SQL Server 2005. New profile properties can be added to the web.config file in same way as the Microsoft SqlProfileProvider. The included web...
-
I've made some major changes to the blog application example. The users and roles now use custom membership and role providers that supports NHibernate. Session context is maintained with a custom implementation of ICurrentSessionContext (a new NHibernate 1.2 feature). The session and session factory...
-
This post is in response to Sam Gentile's post over at code better I'm Learning Rhino Mocks NHibernate StructureMap Policy Injection Blocks Log4Ne t (yea I know, what took so long. Answer, last few apps use the Logging App Block) MonoRail (about to start playing with that) Castle Windsor if I find time...
-
See my comments below.... Figured out what stupid thing i was doing... :( All, I am trying out NHibernate for the first time and I am having some troubles getting it up and running. I have downloaded the sample app from Hibernate.org and started to look at it as well as other samples from the net. When...
-
I've updated the mapping files for Comment and BlogPost in Part III . The changes are: The named query GetCommentsByBlogPostID has been moved into the BlogPost.hbm.xml file, it just makes more sense for it to be there. <loader query-ref="GetCommentsByBlogPostID"/> was added to the...