Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

How to do Manager.FindAll(Object.ClassType)

 Post Reply Post Reply
Author
Araujo Carla View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2014
Posts: 232
Post Options Post Options   Quote Araujo Carla Quote  Post ReplyReply Direct Link To This Post Topic: How to do Manager.FindAll(Object.ClassType)
    Posted: 09 Sep 2015 at 6:31pm
Hi,

How to make a FindAll if I don't know the object class at the compile time,
like Manager.Find(TClass,...
Thanks



Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2362
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 10 Sep 2015 at 2:33pm
There is an overloaded alternative for the Find method that takes the class as parameter:

Manager.Find(TMyClass).List;


Back to Top
Araujo Carla View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2014
Posts: 232
Post Options Post Options   Quote Araujo Carla Quote  Post ReplyReply Direct Link To This Post Posted: 11 Sep 2015 at 1:47pm
if you do this :
 FManager.Find(TStudio).list;
I get the following compiler error

[dcc32 Error] Source.Data.pas(134): E2250 There is no overloaded version
of 'Find' that can be called with these arguments

I have the 2.8 version of aurelius



Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2362
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 11 Sep 2015 at 2:34pm
I'm really sorry, I gave you wrong information. The overloaded method is CReateCriteria:

FManager.CreateCriteria(TStudio).List;


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down