Serialisation LLBLGEN

Posts   
 
    
yider
User
Posts: 6
Joined: 13-Mar-2006
# Posted on: 10-Aug-2007 12:40:39   

Hello I am confronted with a problem of deserialisation.

I have an entity containing collections. I use the selfservising mode.

I serialized my entity.

When I deserialise my entity to work in disconnected mode, my collection must be fetch in the database to be displayed. In deconnected mode, when i want to access my collection list i have an error. (dataSQLConnection) But if i am connected, i don't have this error because my entity can fetch itself with the database.

I want deserialize my entity and work with my entity without the database.

Thank you for your help

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 10-Aug-2007 12:47:14   

xml serialization/ binary serialization? llblgen pro version?

Selfservicing isn't recommended for distributed scenarios. if you want to use selfservicing, use prefetch paths and fetch everything up front as otherwise lazy loading kicks in on the client which obviously doesn't work.

Frans Bouma | Lead developer LLBLGen Pro
yider
User
Posts: 6
Joined: 13-Mar-2006
# Posted on: 10-Aug-2007 15:14:59   

Than you a lot for your response...

But i can't fetch everything when I deserialize my entity because I don't have access to my DataBase (Desconnected mode)...

When you tell me "use prefetch paths ", what i must do??

Thank you

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 11-Aug-2007 17:42:45   

yider wrote:

Than you a lot for your response...

But i can't fetch everything when I deserialize my entity because I don't have access to my DataBase (Desconnected mode)...

When you tell me "use prefetch paths ", what i must do??

Thank you

If you want to use data in a process where there's no access to a database, you have to fetch the data up front (thus first fetch all the data you need (e.g. customers + orders + order details) and then pass it to the client (otherwise, how would the client be able to access the data?) so you use prefetch paths. Please see Using the generated code -> Adapter / self servicing -> Prefetch paths for details.

Frans Bouma | Lead developer LLBLGen Pro