How is what you're doing here: (ln137)

using (new SessionScope())

{

ShoppingCart c1 = ActiveRecordMediator<ShoppingCart
>.FindFirst(Expression.Eq("Customer", "FooBar"));

c1.Items.RemoveAt(0);

ActiveRecordMediator<ShoppingCart>.Update(c1);

}


different than what I'm doing in my code?


the way I read it ...


1. find the cart

2. remote the first item from the collection

3. update the cart




On Wed, Oct 29, 2008 at 9:50 AM, Markus Zywitza <[EMAIL PROTECTED]>wrote:

>  First: Inverse means that adding or removing to the collection does
>> exactly nothing. The collection won't be persisted by NH.
>>
> Addendum: Having inverse=true on a onesided relation is therefore not a
> good idea, you can only add items directly via SQL.
>
> -Markus
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to