Changeset 24999

Show
Ignore:
Timestamp:
02/03/10 21:18:15 (7 months ago)
Author:
piotras
Message:

Do not append PK property to create query (Avoid id=0 in db).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midgard/core/midgard/src/midgard_core_query.c

    r24994 r24999  
    462462        for (i = 0; i < n_prop; i++) { 
    463463 
     464                /* Do not append PK property to query */ 
     465                MgdSchemaPropertyAttr *type_attr = midgard_core_class_get_property_attr (dbklass, pspecs[i]->name); 
     466                if (!type_attr || (type_attr && type_attr->is_primary)) 
     467                        continue; 
     468 
    464469                ftype = G_TYPE_FUNDAMENTAL (pspecs[i]->value_type); 
    465470                value = g_new0 (GValue, 1);