strongloop / loopback-example-offline-sync

Offline sync, change tracking, and replication.
http://loopback.io/doc/en/lb2/Synchronization.html
Other
286 stars 110 forks source link

Postgres - Editing a record #56

Closed anupsaund closed 9 years ago

anupsaund commented 9 years ago

Editing a Todo - creates an index violation as it tries to add the same record into my Todo table.

See attached screenshot...

capture

-- Table: todo

CREATE TABLE todo ( title text, completed boolean, created double precision, id text NOT NULL, CONSTRAINT pkid PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE todo OWNER TO postgres;

bajtos commented 9 years ago

This is most likely a bug in the replication algorithm that have been fixed on loopback master. We should verify after a new version of the following modules was released: loopback, loopback-datasource-juggler, loopback-connector-postgresql. See https://github.com/strongloop/loopback/issues/1167

bajtos commented 9 years ago

See https://github.com/strongloop/loopback/pull/973.

anupsaund commented 9 years ago

@bajtos I implemented https://github.com/strongloop/loopback/pull/973 and it fixed the errors.

bajtos commented 9 years ago

This should be fixed in loopback@2.15.0 and loopback-connector-postgresql@1.7.0.