Support for disconnected scenario's

Posts   
 
    
DrDelete
User
Posts: 39
Joined: 23-Apr-2009
# Posted on: 10-Jun-2009 09:18:27   

A disconnected scenario is where I fetch some object graph from LLBLGenPro, disconnect from the session (and database connection), do some changes in the object graph (deleting in collections, adding entities, updating entities) and then reconnect and save....

Does LLBLGenPro support this kind of scenarios ?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 10-Jun-2009 09:28:08   

LLBLGen Pro is working in a disconnected fashion.

Please the documentation's section: Concepts -> Stateless persistence

DrDelete
User
Posts: 39
Joined: 23-Apr-2009
# Posted on: 10-Jun-2009 09:34:41   

Walaa wrote:

LLBLGen Pro is working in a disconnected fashion.

Please the documentation's section: Concepts -> Stateless persistence

I read the section too, but I wasn't really sure. You are relying on the concurrency system then ?

Let say you have this scenario: userA has a snapshot of an object tree at 12:00 and another userB take the same snapshot at 12.01. UserA updates the object tree at 12.02 and userB updates at 12.03 while userB had the object tree still in memory(not having the updates from userA).... What will be the outcome here?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 10-Jun-2009 10:18:01   

It depends on what you want the outcome to be. The default is that whoever updates last will win. But if you don't want this to happen, you can control itby using Concurrency predicates.

DrDelete
User
Posts: 39
Joined: 23-Apr-2009
# Posted on: 10-Jun-2009 11:32:13   

Walaa wrote:

It depends on what you want the outcome to be. The default is that whoever updates last will win. But if you don't want this to happen, you can control itby using Concurrency predicates.

oke, thanks!