diff --git a/.gitignore b/.gitignore index 6e67d1780..4c16ef610 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,4 @@ unittests/general/Several/Win32/GUI/sqlitetest.db *.db-journal *.txaPackage unittests/general/Several/bin/sqlitetest.db +unittests/general/Several/bin/firebirdtest.fdb diff --git a/sources/MVCFramework.ActiveRecord.pas b/sources/MVCFramework.ActiveRecord.pas index 1fefb89c0..2f68cb2a9 100644 --- a/sources/MVCFramework.ActiveRecord.pas +++ b/sources/MVCFramework.ActiveRecord.pas @@ -281,6 +281,7 @@ TMVCActiveRecord = class function TryGetPKValue(var Value: TValue; out IsNullableType: Boolean): Boolean; procedure AddChildren(const ChildObject: TObject); procedure RemoveChildren(const ChildObject: TObject); + [MVCDoNotSerialize] property TableName: String read fTableName write SetTableName; [MVCDoNotSerialize] property PrimaryKeyIsAutogenerated: Boolean read GetPrimaryKeyIsAutogenerated write SetPrimaryKeyIsAutogenerated; diff --git a/sources/MVCFramework.Commons.pas b/sources/MVCFramework.Commons.pas index 51e15a4cc..05ec9b2ce 100644 --- a/sources/MVCFramework.Commons.pas +++ b/sources/MVCFramework.Commons.pas @@ -1378,6 +1378,7 @@ function CamelCase(const Value: string; const MakeFirstUpperToo: Boolean): strin lIsUpperCase, lPreviousWasUpperCase: Boolean; lIsAlpha: Boolean; begin + {TODO -oDanieleT -cGeneral : Make this function faster!} lNextUpCase := MakeFirstUpperToo; lPreviousWasUpperCase := True; lSB := TStringBuilder.Create; diff --git a/sources/MVCFramework.Serializer.Commons.pas b/sources/MVCFramework.Serializer.Commons.pas index 766cf07ab..be63188e6 100644 --- a/sources/MVCFramework.Serializer.Commons.pas +++ b/sources/MVCFramework.Serializer.Commons.pas @@ -736,7 +736,8 @@ class function TMVCSerializerHelper.GetKeyName(const AProperty: TRttiProperty; c Attrs: TArray; Attr: TCustomAttribute; begin - { in un rendering di una lista, quante volte viene chiamata questa funzione? } + { TODO -oDanieleT -cGeneral : in un rendering di una lista, quante volte viene chiamata questa funzione?} + { Tante volte, ma eliminando tutta la logica si guadagnerebbe al massiom il 6% nel caso tipico, forse non vale la pena di aggiungere una cache apposita } Result := AProperty.Name; Attrs := AProperty.GetAttributes; diff --git a/sources/MVCFramework.pas b/sources/MVCFramework.pas index 3409101dd..2b0ac2000 100644 --- a/sources/MVCFramework.pas +++ b/sources/MVCFramework.pas @@ -2968,8 +2968,8 @@ function TMVCController.GetClientId: string; function TMVCRenderer.GetContentType: string; begin - Result := GetContext.Response.ContentType; - if Result.Trim.IsEmpty then + Result := GetContext.Response.ContentType.Trim; + if Result.IsEmpty then begin GetContext.Response.ContentType := FContext.FConfig[MVCFramework.Commons.TMVCConfigKey.DefaultContentType]; Result := GetContentType;