A couple of questions

3 views
Skip to first unread message

Mauricio Scheffer

unread,
May 15, 2010, 3:11:31 PM5/15/10
to FunctionalNHibernate
Hi all, great work on FunctionalNHibernate! Looks very promising. I
have a couple of question about its current state:

* Are option types handled? Is there a usertype that maps a None to a
NULL in the database?
* How do you handle lazy loading? Since record fields aren't virtual,
the normal proxy factories (Castle/LinFu/Spring) don't work.
* This might seem somewhat stupid, but since there is no inheritance
for records, polymorphic mapping/queries features are lost, right? Or
is there any workaround?

Cheers,
Mauricio

Robert Pickering

unread,
May 16, 2010, 2:38:50 AM5/16/10
to functional...@googlegroups.com
Hi Mauricio,

I was planning to map nullable columns to the option type, but haven't got round to doing this yet.

For both lazy loading and inheritance I was planning to leave them both out. I’ve never really had much use of inheritance in my designs so won’t really miss it. Lazy loading is the more useful of the too, but I find its use within nhibernate a little dangerous. Having proxies that wrap your objects and load the data on demand is a very opaque way of doing things and can mean a couple of innocent looking property access can pull huge object graphs into memory.

Still, having said all that, this project is still at its very early stages, so I’m very much open for ideas. For example, Steffen and I did talk about allowing lazy loading though record member methods, essentially you could add a virtual member to your record using the “with virtual x.GetSubRecords()” syntax and then we would allow you to lazy load a sublist using this method. However,  I don’t think either of us have got round to implementing an example of this.

Cheers,
Rob
Reply all
Reply to author
Forward
0 new messages