After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779716 - INSERT broken when primary key is not dynamic
INSERT broken when primary key is not dynamic
Status: RESOLVED OBSOLETE
Product: gom
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gom Maintainers
Gom Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-07 18:49 UTC by Bastien Nocera
Modified: 2019-03-20 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2017-03-07 18:49:06 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)
Comment 1 GNOME Infrastructure Team 2019-03-20 10:40:26 UTC
-- 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.