Transaction with

Posts   
 
    
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 20-Apr-2009 19:14:35   

When I use Fields mapped on relations (either 1:n, m:1 or, m:n) on an object that it is part of a transaction, does the related object or collection is by default part of the same transaction ?

For example in (m:n relations):


...
EvenementLocEntity evLoc = new EvenementLocEntity(evId);
evLoc.Transaction = trans;
evLoc.IntervalDebut = locInterval.DateDeb;
evLoc.IntervalFin = locInterval.DateFin;
evLoc.Save();

foreach (LocalisationResultatEntity loc in evLoc.LocalisationResultatCollectionViaEvenementLocLocRes)
{
    loc.  
    ...

}
...

Will loc will be part of the transaction "trans" ?