Re: Agenda SDK Dialog: Replicator is not working correctly
I really have not explanation other then AddColumn is called again for each column and the same Replicator instance.
The code for AddColumn is
void Replicator::AddColumn(const char * remote, const char * local, enum ReplicationType type, bool update)
{
columns.push_back(new ReplicatorColumn(remote, local, type, update));
}
And to build the SQL query, we iterate thru columns.
The reason why we don't see this in the ReplicateStart message is, that our Json Library does not allow to add multiple objects with the same name.
Could you add a log output at every place, where you call AddColumn? Something like
debug->printf("%x:AddColumn(%s)", replicator, name);
replicator->AddColumn(...)
If we have a log completely from the call to createReplicator to the error with the wrong SQL statement, we should see if this happens.
I could add code to disallow duplicate AddColumns, but this seems to be a hack to me.