message: Address some of Thomas's review feedback.
diff: @@ -136,8 +136,7 @@ TableRef create_table(Group& group, ObjectSchema const& object_schema)
  TableRef table;
  #if REALM_HAVE_SYNC_STABLE_IDS
  - if (object_schema.primary_key.size()) {
  - const Property* pk_property = object_schema.primary_key_property();
  + if (auto* pk_property = object_schema.primary_key_property()) {
  table = sync::create_table_with_primary_key(group, name, DataType(pk_property->type),
  pk_property->name, pk_property->is_nullable);
  }
  @@ -161,9 +160,8 @@ void add_initial_columns(Group& group, ObjectSchema const& object_schema)
  for (auto const& prop : object_schema.persisted_properties) {
  #if REALM_HAVE_SYNC_STABLE_IDS
  // The sync::create_table* functions create the PK column for us.
  - if (object_schema.primary_key.size() && prop.is_primary) {
  + if (prop.is_primary)
  continue;
  - }
  #endif // REALM_HAVE_SYNC_STABLE_IDS
  add_column(group, *table, prop);
  }
  @@ -273,10 +271,15 @@ void ObjectStore::set_primary_key_for_object(Group& group, StringData object_typ
  #if REALM_HAVE_SYNC_STABLE_IDS
  // sync::create_table* functions should have already updated the pk table.
  - if (primary_key.size() && sync::has_object_ids(group)) {
  + if (sync::has_object_ids(group)) {
  + if (primary_key.size() == 0)
  + REALM_ASSERT(row == not_found);
  + else {
  REALM_ASSERT(row != not_found);
  REALM_ASSERT(table->get_string(c_primaryKeyPropertyNameColumnIndex, row) == primary_key);
  }
  + return;
  + }
  #endif // REALM_HAVE_SYNC_STABLE_IDS
  if (row == not_found && primary_key.size()) {
  