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;
|
||||
lPKInInsert: Boolean;
|
||||
begin
|
||||
lPKInInsert := (not PKFieldName.IsEmpty) and (not(TMVCActiveRecordFieldOption.foAutoGenerated in PKOptions));
|
||||
lPKInInsert := (not PKFieldName.IsEmpty); // and (not(TMVCActiveRecordFieldOption.foAutoGenerated in PKOptions));
|
||||
lSB := TStringBuilder.Create;
|
||||
try
|
||||
lSB.Append('INSERT INTO ' + TableName + '(');
|
||||
@ -74,7 +74,7 @@ begin
|
||||
begin
|
||||
if lKeyValue.Value.Writeable then
|
||||
begin
|
||||
lSB.Append(':' + lKeyValue.Value.FieldName + ',');
|
||||
lSB.Append(lKeyValue.Value.FieldName + ',');
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -86,7 +86,10 @@ begin
|
||||
end;
|
||||
for lKeyValue in Map do
|
||||
begin
|
||||
lSB.Append(':' + lKeyValue.Value.FieldName + ',');
|
||||
if lKeyValue.Value.Writeable then
|
||||
begin
|
||||
lSB.Append(':' + lKeyValue.Value.FieldName + ',');
|
||||
end;
|
||||
end;
|
||||
|
||||
lSB.Remove(lSB.Length - 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user