return ovsdb_idl_read(row, column);
}
+
+/* Returns false if 'row' was obtained from the IDL, true if it was initialized
+ * to all-zero-bits by some other entity. If 'row' was set up some other way
+ * then the return value is indeterminate. */
+bool
+ovsdb_idl_row_is_synthetic(const struct ovsdb_idl_row *row)
+{
+ return row->table == NULL;
+}
\f
/* Transactions. */
if (row->old == row->new) {
continue;
} else if (!row->new) {
- struct json *op = json_object_create();
- json_object_put_string(op, "op", "delete");
- json_object_put_string(op, "table", class->name);
- json_object_put(op, "where", where_uuid_equals(&row->uuid));
- json_array_add(operations, op);
- any_updates = true;
+ if (class->is_root) {
+ struct json *op = json_object_create();
+ json_object_put_string(op, "op", "delete");
+ json_object_put_string(op, "table", class->name);
+ json_object_put(op, "where", where_uuid_equals(&row->uuid));
+ json_array_add(operations, op);
+ any_updates = true;
+ } else {
+ /* Let ovsdb-server decide whether to really delete it. */
+ }
} else {
struct json *row_json;
struct json *op;