LLBLGen and Synchronization

Posts   
 
    
sea1731
User
Posts: 5
Joined: 29-Oct-2008
# Posted on: 29-Oct-2008 09:06:59   

Hello, I use LLBLgen in my C# project to connect to local data cache but when i update an entity(call the save function) the local cache trigger of update don't fire and LastEditDate field doesn't update. Generated code does not include Lasteditdate column. I can regenerate code and manually update LastEditDate in my code but is there a simple way? Or can you show me some way? I'm using LLBLGen 2.6 with selfservicing.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Oct-2008 09:34:58   

but when i update an entity(call the save function) the local cache trigger of update don't fire and LastEditDate field doesn't update.

Please post a code snippet.

sea1731
User
Posts: 5
Joined: 29-Oct-2008
# Posted on: 29-Oct-2008 09:47:15   
_currentPerson = new PersonelEntity();
....
_currentPerson.Save();
Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Oct-2008 09:52:51   

Please post real code. Otherwise we can't determine what went wrong.

Make sure fields are set to values before the Save call, and make sure the IsChanged property of each entityfield evaluates to true.

sea1731
User
Posts: 5
Joined: 29-Oct-2008
# Posted on: 29-Oct-2008 10:03:07   

Sorry, i missed that the trigger does not exist in localcachedata. I want to work with local data offline but at the first synch when online i want the synchronization to send all the data to server. But because lasteditdate does not change when a row updates, at first sychit gets all data from server overwrtiting changes made while offline."SyncDirection" does not change anything. But if i can put tiggers in local data(SQl server ce) they can change lasteditdate while working offline.



ServisPersonelCacheSyncAgent syncAgent = new ServisPersonelCacheSyncAgent();
syncAgent.PERSONEL.SyncDirection = Microsoft.Synchronization.Data.SyncDirection.UploadOnly;
SyncStatistics syncStats = syncAgent.Synchronize();


And also the "Save" works without a problem. It saves the entity to local database successfully.