hdahl wrote:
Hello!
I would like to pass NHibernate domain objects between tiers.
How do I for instance marshall collections :?:
Should I do something in order to prevent excessive unnecessary database work :?:
Is there some kind of documentation documenting this, I suppose, ordinary situation :?:
Best regards,
Henrik Dahl
It's impossible to pass Domain Model. Domain objects are difficult related and it's impossible to serialize it to XML (see <many-to-one> for ex.).
Other way - use XmlIgnore, but it's wrong architecture (IMHO).
Application server for my app implemented using WSE 2.0 and I am using Data Transfer Objects for passing data between tiers. You can reed about it here:
www.martinfowler.com. (or search for "Patterns of enterprise application architecture" in ed2k)
DTO deploying on client and server. To make it Domain model independent you must make Assemblers which only copying properties from domain objects to DTO properties.
Best regards.