Changeset 21 for trunk/Forms/UImportStructureForm.pas
- Timestamp:
- Jun 16, 2011, 10:32:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UImportStructureForm.pas
r20 r21 160 160 PropType := Columns[C].Values['DATA_TYPE']; 161 161 if Columns[C].Values['CONSTRAINT_TYPE'] = 'FOREIGN KEY' then begin 162 RefObjectIndex := ObjectIdByName(Columns[C].Values['REFERENCED_TABLE_NAME']); 162 163 PropertyId := Core.System.AddPropertyRelationOne(ObjectId, PropertyName, PropertyName, 163 ObjectIdByName(Columns[C].Values['REFERENCED_TABLE_NAME']));164 True, StrToInt(TSQLTable(SQLTables[RefObjectIndex]).Table.Values['ObjId'])); 164 165 end else 165 166 if PropType = 'int' then 166 PropertyId := Core.System.AddPropertyNumber(ObjectId, PropertyName, PropertyName );167 PropertyId := Core.System.AddPropertyNumber(ObjectId, PropertyName, PropertyName, True); 167 168 if PropType = 'varchar' then 168 PropertyId := Core.System.AddPropertyString(ObjectId, PropertyName, PropertyName );169 PropertyId := Core.System.AddPropertyString(ObjectId, PropertyName, PropertyName, True); 169 170 if PropType = 'float' then 170 PropertyId := Core.System.AddPropertyFloat(ObjectId, PropertyName, PropertyName );171 PropertyId := Core.System.AddPropertyFloat(ObjectId, PropertyName, PropertyName, True); 171 172 if PropType = 'datetime' then 172 PropertyId := Core.System.AddPropertyDateTime(ObjectId, PropertyName, PropertyName );173 PropertyId := Core.System.AddPropertyDateTime(ObjectId, PropertyName, PropertyName, True); 173 174 Columns[C].Add('Id', IntToStr(PropertyId)); 174 175 Memo1.Lines.Add('Create property "' + PropertyName + '" of type ' + PropType + '"'); … … 192 193 RefPropertyId := StrToInt(TSQLTable(SQLTables[T]).Columns[RefPropertyId].Values['Id']); 193 194 PropertyId := Core.System.AddPropertyRelationMany(StrToInt(TSQLTable(SQLTables[RefObjectIndex]).Table.Values['ObjId']), TableName, TableName, 194 RefPropertyId);195 True, RefPropertyId); 195 196 end; 196 197 end;
Note:
See TracChangeset
for help on using the changeset viewer.