GNOME Bugzilla – Bug 779716
INSERT broken when primary key is not dynamic
Last modified: 2019-03-20 10:40:26 UTC
In gom/gom-command-builder.c: 732 has_dynamic_pkey = gom_resource_has_dynamic_pkey (priv->resource_type);• 733 if (!has_dynamic_pkey) {• 734 g_string_append_printf(str, "'%s'", gom_resource_class_get_primary_key(klass)); //FIXME• 735 did_pspec = TRUE;• 736 }• And we then loop over all the keys without skipping the already entered primary key. Leading to something like: ERROR:/home/test/jhbuild/checkout/gom/tests/test-gom-sub-subclass.c:351:stress_item2: assertion failed (error == NULL): sqlite3_prepare_v2 failed: table items has no column named nickname: INSERT INTO items ('first-name', 'first-name', 'nickname') VALUES (?, ?, ?); ("gom-error-quark", 2) (The important part being the double 'first-name' column)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gom/issues/19.