this sounds interesting. But what about adding a new user to your
1000000 strong user base? What collection would you add you new user
to?

On 10/18/10, Fabio Maulo <[email protected]> wrote:
> lazy="extra" but take care with the collection semantic (ISet have to check
> the duplication of an item when you add something)
>
> On Mon, Oct 18, 2010 at 3:21 PM, Mike Scott <[email protected]> wrote:
>
>> I'm trying to implement some of the ideas of Udi Dahan in his blog
>> post "Don't create aggregate roots" (http://www.udidahan.com/
>> 2009/06/29/dont-create-aggregate-roots/) using NHibernate.
>>
>> In a nutshell, the idea is to avoid explicit persistence code. When
>> one wants to save a new object, instead of doing a session.Save(...),
>> one loads another object and adds the new object to a collection on
>> the existing object. The idea is that the ORM will persist the new
>> object automatically. Think of adding an order - just load the user
>> and add the new order to the user's Orders collection. It's a very
>> elegant idea, but...
>>
>> It works fine with NHibernate, but the problem is that when the new
>> object is added to the collection, this triggers NHibernate to load
>> ALL the items in the collection.
>>
>> Is there a way where one can add an item to a proxied collection in
>> NHibernate *without* it loading all the other entries, so that only
>> the new item will be persisted to the database?
>>
>> Would it require a special collection proxy?
>>
>> --
>> 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]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>>
>
>
> --
> Fabio Maulo
>
> --
> 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.
>
>


-- 
Cheers,

w://

-- 
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