There shouldn't be any trouble. NHibernate supports it and it shouldn't do
redundant or inconsistent saves, if that's your concern.

   Diego


On Thu, Jun 17, 2010 at 05:22, Ahmed Emad <[email protected]> wrote:

> thx Diego for your attention and help
> but what about the 2 ends
> are there any troubles in putting cascading at every end in association?
>
>
> On 16 June 2010 18:56, Diego Mijelshon <[email protected]> wrote:
>
>> Ahmed,
>>
>> I don't think there's a single "best practice" here. It all depends on
>> your usage.
>>
>>    Diego
>>
>>
>> On Wed, Jun 16, 2010 at 11:34, Ahmed Emad <[email protected]> wrote:
>>
>>> hi all,
>>>
>>> i know that we can choose cascading option for collections or for any
>>> association type in Nhibernate
>>>
>>> but in case of bidirectional association is it better to choose cascading
>>> opi\tion for both 2 directions. and if it is better , are there prefered
>>> Suitable options?
>>>
>>> for example :
>>> i have 2 classes person and job with one - many association from person
>>> to job
>>>
>>> In Job====>
>>>     <many-to-one name="Person" class="Person" cascade="save-update"  >
>>>       <column name="PersonId" />
>>>     </many-to-one>
>>>
>>> In Person===>
>>>
>>>     <bag name="Jobs" lazy="true" inverse="true" cascade="save-update">
>>>       <key>
>>>         <column name="Id" />
>>>       </key>
>>>       <one-to-many class="Job" />
>>>     </bag>
>>>
>>> does it better to determine cascding that marked red?
>>> or i should put cascading only for collection end of association
>>>
>>> and what is the case in one-one association?
>>>
>>> Note : my questions not about does it work , how to work better
>>>
>>> thx in advance
>>>
>>>  --
>>> 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.
>>>
>>
>>  --
>> 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.
>>
>
>  --
> 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.
>

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