Enable the change log and list all changes, or only the change logs for a particular entity, Customer.
// Retrieve all change logs
[SUP101SUP101DB enableChangeLog];
[SUP101SUP101DB synchronize];
SUPObjectList *changeLogs = [SUP101SUP101DB getChangeLogs:[SUPQuery getInstance]];
if([changeLogs size] > 0)
{
for (id<SUPChangeLog> cl in changeLogs)
{
MBOLogInfo(@"changelog:[entityType=%d]\n", [cl entityType]);
}
}
// Retrieve only the change logs for Customer:
[SUP101SUP101DB enableChangeLog];
[SUP101SUP101DB synchronize];
SUPQuery *changelogQuery = [SUPQuery getInstance];
int entityInt = SUP101_ENTITY_TYPE_Customer;
changelogQuery.testCriteria = [SUPAttributeTest equal:@"entityType" :[NSNumber numberWithInt:entityInt]];
SUPObjectList *changeLogs = [SUP101SUP101DB getChangeLogs:changelogQuery ];
if([changeLogs size] > 0)
{
for (id<SUPChangeLog> cl in changeLogs)
{
MBOLogInfo(@"changelog:[entityType=%d]\n", [cl entityType]);
}
}