mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Small fixes for Interbase SQLGenerator
This commit is contained in:
parent
a8ee598b9d
commit
57e785efd7
Binary file not shown.
@ -62,7 +62,7 @@ var
|
|||||||
lSB: TStringBuilder;
|
lSB: TStringBuilder;
|
||||||
lPKInInsert: Boolean;
|
lPKInInsert: Boolean;
|
||||||
begin
|
begin
|
||||||
lPKInInsert := (not PKFieldName.IsEmpty) and (not(TMVCActiveRecordFieldOption.foAutoGenerated in PKOptions));
|
lPKInInsert := (not PKFieldName.IsEmpty); // and (not(TMVCActiveRecordFieldOption.foAutoGenerated in PKOptions));
|
||||||
lSB := TStringBuilder.Create;
|
lSB := TStringBuilder.Create;
|
||||||
try
|
try
|
||||||
lSB.Append('INSERT INTO ' + TableName + '(');
|
lSB.Append('INSERT INTO ' + TableName + '(');
|
||||||
@ -74,7 +74,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if lKeyValue.Value.Writeable then
|
if lKeyValue.Value.Writeable then
|
||||||
begin
|
begin
|
||||||
lSB.Append(':' + lKeyValue.Value.FieldName + ',');
|
lSB.Append(lKeyValue.Value.FieldName + ',');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -85,9 +85,12 @@ begin
|
|||||||
lSB.Append(':' + PKFieldName + ',');
|
lSB.Append(':' + PKFieldName + ',');
|
||||||
end;
|
end;
|
||||||
for lKeyValue in Map do
|
for lKeyValue in Map do
|
||||||
|
begin
|
||||||
|
if lKeyValue.Value.Writeable then
|
||||||
begin
|
begin
|
||||||
lSB.Append(':' + lKeyValue.Value.FieldName + ',');
|
lSB.Append(':' + lKeyValue.Value.FieldName + ',');
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
lSB.Remove(lSB.Length - 1, 1);
|
lSB.Remove(lSB.Length - 1, 1);
|
||||||
lSB.Append(')');
|
lSB.Append(')');
|
||||||
|
Loading…
Reference in New Issue
Block a user