Browse Source

* ReadListClass SQL statement needs correct where, O not assigned in MapObjectToRow

git-svn-id: trunk@11387 -
michael 17 years ago
parent
commit
c74999cf5f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/fcl-db/src/codegen/fpcgtiopf.pp

+ 2 - 1
packages/fcl-db/src/codegen/fpcgtiopf.pp

@@ -292,7 +292,7 @@ begin
                   If F.Enabled then
                     begin
                     S:=AddToS(S,F.FieldName);
-                    If (F.PropertyName=SOID) then
+                    If (V=voRead) and (F.PropertyName=SOID) then
                       W:=Format('%s = :%s',[F.FieldName,F.FieldName]);
                     end;
                   end;
@@ -493,6 +493,7 @@ begin
   EndMethod(Strings,S);
   // MapRowToObject
   S:=BeginMapRowToObject(Strings,C,ObjectClassName);
+  Addln(Strings,'O:=%s(Visited);',[ObjectClassName]);
   Addln(Strings,'With Query do',[ObjectClassName]);
   IncINdent;
   try