diff --git a/samples/jsonrpc_with_published_objects/MyObjectU.pas b/samples/jsonrpc_with_published_objects/MyObjectU.pas index eb990af50..7a1479397 100644 --- a/samples/jsonrpc_with_published_objects/MyObjectU.pas +++ b/samples/jsonrpc_with_published_objects/MyObjectU.pas @@ -176,10 +176,10 @@ function TMyObject.GetPeopleDataset: TFDMemTable; function TMyObject.GetStringDictionary: TMVCStringDictionary; begin Result := TMVCStringDictionary.Create; - Result.AddProperty('key1', 'value1'); - Result.AddProperty('key2', 'value2'); - Result.AddProperty('key3', 'value3'); - Result.AddProperty('key4', 'value4'); + Result.Add('key1', 'value1'); + Result.Add('key2', 'value2'); + Result.Add('key3', 'value3'); + Result.Add('key4', 'value4'); end; function TMyObject.GetUser(aUserName: string): TPerson; diff --git a/samples/renders_spring4d_nullables/CustomTypesSerializersU.pas b/samples/renders_spring4d_nullables/CustomTypesSerializersU.pas index c8bf5555d..e7e1b74d4 100644 --- a/samples/renders_spring4d_nullables/CustomTypesSerializersU.pas +++ b/samples/renders_spring4d_nullables/CustomTypesSerializersU.pas @@ -28,7 +28,7 @@ interface uses MVCFramework.Serializer.Intf, - System.Rtti; + System.Rtti, MVCFramework.Serializer.Commons; type // Custom serializer for TNullableAliasSerializer type @@ -43,7 +43,8 @@ TNullableIntegerSerializer = class(TInterfacedObject, IMVCTypeSerializer) procedure SerializeRoot( const AObject: TObject; out ASerializerObject: TObject; - const AAttributes: TArray + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil ); procedure DeserializeAttribute( @@ -77,7 +78,8 @@ TNullableCurrencySerializer = class(TInterfacedObject, IMVCTypeSerializer) procedure SerializeRoot( const AObject: TObject; out ASerializerObject: TObject; - const AAttributes: TArray + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil ); procedure DeserializeAttribute( @@ -111,7 +113,8 @@ TNullableStringSerializer = class(TInterfacedObject, IMVCTypeSerializer) procedure SerializeRoot( const AObject: TObject; out ASerializerObject: TObject; - const AAttributes: TArray + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil ); procedure DeserializeAttribute( @@ -145,7 +148,8 @@ TPersonSerializer = class(TInterfacedObject, IMVCTypeSerializer) procedure SerializeRoot( const AObject: TObject; out ASerializerObject: TObject; - const AAttributes: TArray + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil ); procedure DeserializeAttribute( @@ -173,8 +177,7 @@ implementation Spring, MVCFramework.Serializer.JsonDataObjects, BusinessObjectsU, - System.SysUtils, - MVCFramework.Serializer.Commons; + System.SysUtils; procedure TNullableIntegerSerializer.Deserialize(const ASerializedObject: TObject; var AElementValue: TValue; const AAttributes: TArray); @@ -224,8 +227,12 @@ procedure TNullableIntegerSerializer.SerializeAttribute(const AElementValue: TVa (ASerializerObject as TJDOJsonObject).Values[APropertyName] := nil; end; -procedure TNullableIntegerSerializer.SerializeRoot(const AObject: TObject; - out ASerializerObject: TObject; const AAttributes: TArray); +procedure TNullableIntegerSerializer.SerializeRoot( + const AObject: TObject; + out ASerializerObject: TObject; + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil + ); begin raise EMVCSerializationException.Create('Not supported'); end; @@ -281,8 +288,12 @@ procedure TNullableCurrencySerializer.SerializeAttribute(const AElementValue: TV (ASerializerObject as TJDOJsonObject).Values[APropertyName] := nil; end; -procedure TNullableCurrencySerializer.SerializeRoot(const AObject: TObject; - out ASerializerObject: TObject; const AAttributes: TArray); +procedure TNullableCurrencySerializer.SerializeRoot( + const AObject: TObject; + out ASerializerObject: TObject; + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil + ); begin raise EMVCSerializationException.Create('Not supported'); end; @@ -338,8 +349,12 @@ procedure TNullableStringSerializer.SerializeAttribute(const AElementValue: TVal (ASerializerObject as TJDOJsonObject).Values[APropertyName] := nil; end; -procedure TNullableStringSerializer.SerializeRoot(const AObject: TObject; - out ASerializerObject: TObject; const AAttributes: TArray); +procedure TNullableStringSerializer.SerializeRoot( + const AObject: TObject; + out ASerializerObject: TObject; + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil + ); begin raise EMVCSerializationException.Create('Not supported'); end; @@ -382,8 +397,12 @@ procedure TPersonSerializer.SerializeAttribute(const AElementValue: TValue; TJDOJsonObject(ASerializerObject).O[APropertyName] := lJSON; end; -procedure TPersonSerializer.SerializeRoot(const AObject: TObject; - out ASerializerObject: TObject; const AAttributes: TArray); +procedure TPersonSerializer.SerializeRoot( + const AObject: TObject; + out ASerializerObject: TObject; + const AAttributes: TArray; + const ASerializationAction: TMVCSerializationAction = nil + ); var lPerson: TPerson; lJSON: TJDOJsonObject; diff --git a/samples/renders_spring4d_nullables/MainControllerU.pas b/samples/renders_spring4d_nullables/MainControllerU.pas index b7e5a0f0f..e451dabea 100644 --- a/samples/renders_spring4d_nullables/MainControllerU.pas +++ b/samples/renders_spring4d_nullables/MainControllerU.pas @@ -63,9 +63,9 @@ procedure TMyController.GetDictionary; lDict: TMVCStringDictionary; begin lDict := TMVCStringDictionary.Create; - lDict.AddProperty('prop1', 'one'); - lDict.AddProperty('prop2', 'two'); - lDict.AddProperty('prop3', 'three'); + lDict.Add('prop1', 'one'); + lDict.Add('prop2', 'two'); + lDict.Add('prop3', 'three'); Render(lDict); end; diff --git a/sources/MVCFramework.ActiveRecordController.pas b/sources/MVCFramework.ActiveRecordController.pas index d6afd2ea7..abc5f8189 100644 --- a/sources/MVCFramework.ActiveRecordController.pas +++ b/sources/MVCFramework.ActiveRecordController.pas @@ -153,7 +153,7 @@ procedure TMVCActiveRecordController.GetEntities(const entityname: string); lResp := TMVCActiveRecordListResponse.Create(TMVCActiveRecord.SelectRQL(lARClassRef, lRQL, GetMaxRecordCount), True); try - lResp.Metadata.AddProperty('count', lResp.Items.Count.ToString); + lResp.Metadata.Add('count', lResp.Items.Count.ToString); Render(lResp); except lResp.Free; diff --git a/sources/dmvcframeworkbuildconsts.inc b/sources/dmvcframeworkbuildconsts.inc index d6f61bcc6..9b19763ae 100644 --- a/sources/dmvcframeworkbuildconsts.inc +++ b/sources/dmvcframeworkbuildconsts.inc @@ -1,2 +1,2 @@ const - DMVCFRAMEWORK_VERSION = '3.1.1 (beryllium) RC2'; \ No newline at end of file + DMVCFRAMEWORK_VERSION = '3.1.1 (beryllium) RC3'; \ No newline at end of file diff --git a/tasks.py b/tasks.py index 7ec48e799..2e0179460 100644 --- a/tasks.py +++ b/tasks.py @@ -108,6 +108,7 @@ def copy_sources(): ] folders = [ + "d100", "d101", "d102", "d103"