A common problem facing NHibernate users seems to be handling lazy
loading of blob data. There are various ways to solve that for smaller
blobs. But when blobs get larger (images, videos), you should really
stream the data. However, it's not appropriate to map a Stream,
TextReader or even XmlReader object to your entities since their
contract contains a current position and expect to be closed and
disposed of.

I've just now started a blog post series about this at:
http://blog.calyptus.eu/seb/2009/03/large-object-storage-for-nhibernate-and-ddd-part-1-blobs-clobs-and-xlobs/

My suggestion involves incorporating new Blob and Clob style contracts
(similar to the ones in Java) in the .NET framework because as far as
I know, there isn't really a comparable base class or interface
available.

Since this is such an intrusive suggestion I would like to get a
discussion going around these new types. I'm sure there is going to be
controversy. There is precedence with the Iesi collection types which
enforced a stronger contract on the domain model.

Feel free to poke around the source code available at my SVN:
http://nh.svn.calyptus.se/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to