PrefetchPath

Posts   
 
    
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 04-May-2009 20:10:06   

Does prefetchPath retrieve data in the same transaction as the collection queried ?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-May-2009 04:29:58   

Transactions are not started automatically during fresh fetches. If you want that, you should add the collection to the transaction before fetch it. However fetching always places read-locks on the rows affected. WRITES to those rows then have to wait till the locks are lifted, that's how SQLServer works. You either have to commit or rollback the transaction.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 05-May-2009 09:05:50   

Wally wrote:

Does prefetchPath retrieve data in the same transaction as the collection queried ?

If the root collection is in the transaction, the other fetches are in the same transaction.

Frans Bouma | Lead developer LLBLGen Pro
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 05-May-2009 15:14:47   

Thanks a lot to both.

My question was not very clear but Frans answer was exactly the one I was expecting.

Thanks a lot!simple_smile