message: Fix for Unique constraint issues for update clause. Use Id not local ID when ID is present (lib),
diff: @@ -2064,6 +2064,10 @@ error Database::saveModel(
  logger().debug(ss.str());
  if (model->ID()) {
  + std::stringstream ss;
  + ss << "Model ID present " << model->ID()
  + << " in thread " << Poco::Thread::currentTid();
  + logger().debug(ss.str());
  *session_ <<
  "update time_entries set "
  "id = :id, uid = :uid, description = :description, "
  @@ -2077,7 +2081,7 @@ error Database::saveModel(
  "updated_at = :updated_at, "
  "project_guid = :project_guid, "
  "validation_error = :validation_error "
  - "where local_id = :local_id",
  + "where id = :id",
  useRef(model->ID()),
  useRef(model->UID()),
  useRef(model->Description()),
  @@ -2097,9 +2101,13 @@ error Database::saveModel(
  useRef(model->UpdatedAt()),
  useRef(model->ProjectGUID()),
  useRef(model->ValidationError()),
  - useRef(model->LocalID()),
  + useRef(model->ID()),
  now;
  } else {
  + std::stringstream ss;
  + ss << "Model ID NOT present using local ID " << model->LocalID()
  + << " in thread " << Poco::Thread::currentTid();
  + logger().debug(ss.str());
  *session_ <<
  "update time_entries set "
  "uid = :uid, description = :description, wid = :wid, "
  @@ -2158,6 +2166,9 @@ error Database::saveModel(
  << " in thread " << Poco::Thread::currentTid();
  logger().debug(ss.str());
  if (model->ID()) {
  + ss << "Model ID present " << model->ID()
  + << " in thread " << Poco::Thread::currentTid();
  + logger().debug(ss.str());
  *session_ <<
  "insert or replace into time_entries(id, uid, description, "
  "wid, guid, pid, tid, billable, "
  @@ -2192,6 +2203,9 @@ error Database::saveModel(
  useRef(model->ValidationError()),
  now;
  } else {
  + ss << "Model ID NOT present using local ID " << model->LocalID()
  + << " in thread " << Poco::Thread::currentTid();
  + logger().debug(ss.str());
  *session_ <<
  "insert or replace into time_entries(uid, description, wid, "
  "guid, pid, tid, billable, "
  