Quote:
Hi, everyone.
I'm using hibernate v. 2.1. and I'm implementing a mailing system, with message sending/receiving - just like an usual e-mailing system. The message entity has a set of attachments, which has some properties like filename and mimetype, and a property called contents. This property (contents) returns or sets a byte[] from a blob. Because this system is web driven, it's a strong requirement that the contents of an attachment be loaded on demand, i.e. just when the user clicks on an attachment. Is there a way to make a single property lazy-instantiatable, as we can do with collections? I want to do that because I'm retrieving the messages with its attachments, but I don't want to retrieve the attachment's contents, which would decrease the performance in a situation like, say, listing all the messages.
Thanks anticipatedly,
julioaragao