-
Notifications
You must be signed in to change notification settings - Fork 570
Description
if you call reload function on PersonalCacheStruct especially entity has ReadWriteDB property
it will re-load data from Database.
and it set value by ReadEntityProperty method in SqlDataReceiver.cs
it call entity's Property function and it fire event NotifyChange event and the value will be added to SyncQueueManager. clearly not expected behavior.
moreover the "ReadEntityProperty" function set value sequencely
each set value fire event and the "not completed setting entity' will be added;
in another word.
if you have some entity like below
[EntityTable]
class someentity
{
[EntityField(true)]
public long userID {get;set}
[EntityField(true)]
public long subkey {get;set}
}
and we have one data from database as below
UserID, subKey
1, 2
now call
PersonalCacheStruct().Reload();
then we will have two DataSyncQueue item
1-0, 1-2
we don't need add this data to DataSyncQueue again. just waste performance