Re: Replicator is running in infinite loop after update 13r1 App to 13r3 App
Hi
with a little bit of experimentig i found the Problem. The Problem was that Replicator was using username(h323) "ON CONFLICT (username)" part of the query and that cant be used because it contains null values.
for this to work you have to change ON CONFLICT (some_unique_key)" part of the query. Only way I could change this clause was to reorder replicator AddColumn code.
Here is solution:
replicator = IReplicator::createReplicator(this, "PbxTableUsers", 0, 0, "domain", "pbx", database, "users", true, false); RegisterJsonApi(replicator); replicator->AddColumn("guid", "uid", ReplicationString, false); <--- must be on first place to change "ON CONFLICT (uid)" part of insert query of replicator replicator->AddColumn("h323", "username", ReplicationString, true); replicator->AddColumn("e164", "phone", ReplicationString, true); replicator->AddColumn("cn", "cn", ReplicationString, true); replicator->AddColumn("node", "node", ReplicationString, false); replicator->AddColumn("pseudo", "pseudo", ReplicationString, false);
I could not find this in any tutorial or any documentation.
Best Regards
Iqbal