Ignore:
Timestamp:
Jun 16, 2011, 10:32:01 AM (13 years ago)
Author:
george
Message:
  • Added: Item selection form for TypeRelationOne.
  • Modified: Primary keys have to have their property record for each object.
  • Added: Object propery havet to be initialized with Editable flag.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UImportStructureForm.pas

    r20 r21  
    160160        PropType := Columns[C].Values['DATA_TYPE'];
    161161        if Columns[C].Values['CONSTRAINT_TYPE'] = 'FOREIGN KEY' then begin
     162          RefObjectIndex := ObjectIdByName(Columns[C].Values['REFERENCED_TABLE_NAME']);
    162163          PropertyId := Core.System.AddPropertyRelationOne(ObjectId, PropertyName, PropertyName,
    163             ObjectIdByName(Columns[C].Values['REFERENCED_TABLE_NAME']));
     164            True, StrToInt(TSQLTable(SQLTables[RefObjectIndex]).Table.Values['ObjId']));
    164165        end else
    165166        if PropType = 'int' then
    166           PropertyId := Core.System.AddPropertyNumber(ObjectId, PropertyName, PropertyName);
     167          PropertyId := Core.System.AddPropertyNumber(ObjectId, PropertyName, PropertyName, True);
    167168        if PropType = 'varchar' then
    168           PropertyId := Core.System.AddPropertyString(ObjectId, PropertyName, PropertyName);
     169          PropertyId := Core.System.AddPropertyString(ObjectId, PropertyName, PropertyName, True);
    169170        if PropType = 'float' then
    170           PropertyId := Core.System.AddPropertyFloat(ObjectId, PropertyName, PropertyName);
     171          PropertyId := Core.System.AddPropertyFloat(ObjectId, PropertyName, PropertyName, True);
    171172        if PropType = 'datetime' then
    172           PropertyId := Core.System.AddPropertyDateTime(ObjectId, PropertyName, PropertyName);
     173          PropertyId := Core.System.AddPropertyDateTime(ObjectId, PropertyName, PropertyName, True);
    173174        Columns[C].Add('Id', IntToStr(PropertyId));
    174175        Memo1.Lines.Add('Create property "' + PropertyName + '" of type ' + PropType + '"');
     
    192193          RefPropertyId := StrToInt(TSQLTable(SQLTables[T]).Columns[RefPropertyId].Values['Id']);
    193194          PropertyId := Core.System.AddPropertyRelationMany(StrToInt(TSQLTable(SQLTables[RefObjectIndex]).Table.Values['ObjId']), TableName, TableName,
    194             RefPropertyId);
     195            True, RefPropertyId);
    195196        end;
    196197      end;
Note: See TracChangeset for help on using the changeset viewer.