Ignore:
Timestamp:
May 10, 2012, 1:18:25 PM (13 years ago)
Author:
chronos
Message:
  • Modified: PersistentData Memory backend partial implementation.
  • Modified: Some persistent type system modifications.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • PersistentData/Backend/UPDClientMySQL.pas

    r361 r362  
    5050resourcestring
    5151  SMissingBaseType = 'Missing base typ for %s';
    52   SUndefinedType = 'Undefinned type %s';
    53   SCantLoadObjectWithoutId = 'Can''t load object without id';
     52  SUndefinedType = 'Undefined type in %0:s.%1:s';
    5453
    5554
     
    172171    for I := 0 to AType.Properties.Count - 1 do
    173172    with AType.Properties do begin
    174       RefType := Types.SearchByName(Items[I].Value);
     173      RefType := TPDTypeProperty(Items[I]).DbType;
    175174      if not Assigned(RefType) then
    176         raise Exception.Create(Format(SUndefinedType, [Items[I].Value]));
     175        raise Exception.Create(Format(SUndefinedType, [AType.Name, TPDTypeProperty(Items[I]).Name]));
    177176      if RefType.DbType = '' then
    178177        raise Exception.Create(Format(SMissingBaseType, [RefType.Name]));
    179178
    180       Query := Query + '`' + Items[I].Key + '` ' + RefType.DbType + ' NULL,';
     179      Query := Query + '`' + TPDTypeProperty(Items[I]).Name + '` ' + RefType.DbType + ' NULL,';
    181180    end;
    182181    Query := Query + 'PRIMARY KEY (`Id`)' +
Note: See TracChangeset for help on using the changeset viewer.