From 52fb8f0a5fc6385672a53eb2001ee4ddac2f857a Mon Sep 17 00:00:00 2001 From: piotras Date: Fri, 19 Apr 2013 11:25:34 +0200 Subject: [PATCH] Remove oid_id field usage. Refs gh-185 --- src/midgard_repligard.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/midgard_repligard.c b/src/midgard_repligard.c index 5e1ebd7d..0a36a0d3 100644 --- a/src/midgard_repligard.c +++ b/src/midgard_repligard.c @@ -117,16 +117,6 @@ midgard_repligard_create_object_info (MidgardRepligard *self, MidgardObject *obj g_clear_error (&err); return FALSE; } - /* workspace_oid */ - gda_set_set_holder_value (params, &err, "midgard_ws_oid_id", MGD_OBJECT_WS_ID (object)); - if (err) { - g_set_error (error, MIDGARD_GENERIC_ERROR, MIDGARD_GENERIC_ERROR_INTERNAL, - "Failed to set midgard_ws_oid_id INSERT parameter: %s.", - err && err->message ? err->message : "Unknown reason"); - g_clear_error (&err); - return FALSE; - } - } if (MGD_CNC_DEBUG (mgd)) { @@ -428,8 +418,8 @@ __initialize_statement_insert_query_string (MidgardDBObjectClass *klass, gboolea if (!add_workspace) { g_string_append (sql, "(guid, typename, object_action) VALUES (##guid::string, ##typename::string, ##object_action::guint)"); } else { - g_string_append (sql, "(guid, typename, object_action, midgard_ws_id, midgard_ws_oid_id) " - "VALUES (##guid::string, ##typename::string, ##object_action::guint, ##midgard_ws_id::guint, ##midgard_ws_oid_id::guint)"); + g_string_append (sql, "(guid, typename, object_action, midgard_ws_id) " + "VALUES (##guid::string, ##typename::string, ##object_action::guint, ##midgard_ws_id::guint)"); } return g_string_free (sql, FALSE); @@ -643,21 +633,6 @@ static void _midgard_repligard_class_init( g_hash_table_insert (type_attr->prophash, g_strdup ((gchar *)property_name), prop_attr); type_attr->_properties_list = g_slist_append (type_attr->_properties_list, (gpointer) property_name); - /* Workspace OID */ - property_name = "workspaceoid"; - pspec = g_param_spec_uint (property_name, - "Workspace OID", - "", - 0, G_MAXUINT32, 0, G_PARAM_READWRITE); - g_object_class_install_property (gobject_class, PROPERTY_WORKSPACE_ID, pspec); - prop_attr = midgard_core_schema_type_property_attr_new(); - prop_attr->gtype = MGD_TYPE_UINT; - prop_attr->field = g_strdup ("midgard_ws_oid_id"); - prop_attr->table = g_strdup (MGD_REPLIGARD_TABLE); - prop_attr->tablefield = g_strjoin (".", MGD_REPLIGARD_TABLE, "midgard_ws_oid_id", NULL); - g_hash_table_insert (type_attr->prophash, g_strdup ((gchar *)property_name), prop_attr); - type_attr->_properties_list = g_slist_append (type_attr->_properties_list, (gpointer) property_name); - MIDGARD_DBOBJECT_CLASS (klass)->dbpriv = midgard_core_dbobject_private_new (); MIDGARD_DBOBJECT_CLASS (klass)->dbpriv->storage_data = type_attr; MIDGARD_DBOBJECT_CLASS (klass)->dbpriv->storage_data->table = g_strdup (MGD_REPLIGARD_TABLE);