Revision: 865
http://instantobjects.svn.sourceforge.net/instantobjects/revision/?rev=865&view=rev
Author: nandod
Date: 2009-08-26 15:33:19 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
* Better fix for rev. 859. Previous version caused unwarranted exceptions with IQL statements set at design time.
Modified Paths:
--------------
trunk/Source/Core/InstantCommand.pas
Modified: trunk/Source/Core/InstantCommand.pas
===================================================================
--- trunk/Source/Core/InstantCommand.pas 2009-08-26 01:03:07 UTC (rev 864)
+++ trunk/Source/Core/InstantCommand.pas 2009-08-26 15:33:19 UTC (rev 865)
@@ -1499,17 +1499,20 @@
procedure TInstantIQLClassRef.ReadObject(Reader: TInstantIQLReader);
var
Token: string;
+ LClass: TPersistentClass;
begin
inherited;
Token := Reader.ReadToken;
FAny := SameText(Token, 'ANY');
if FAny then
Token := Reader.ReadToken;
- // This call has the double effect of checking that the class exists early
- // during statement parsing, and correcting the class name if it's written
- // with wrong capitalization (something that would create problems with
- // case-sensitive databases).
- FObjectClassName := FindClass(Token).ClassName;
+ // Fix the class name in case it's written with wrong capitalization
+ // (something that would create problems with case-sensitive databases).
+ LClass := GetClass(Token);
+ if Assigned(LClass) then
+ FObjectClassName := LClass.ClassName
+ else
+ FObjectClassName := Token;
end;
procedure TInstantIQLClassRef.WriteObject(Writer: TInstantIQLWriter);
|