Hello,
I'm developing a ORM with lazarus 2.24 and FPC 3.2.2 using RTTI and all functionallity working. I create database, create table, create columns, create index and so on. I developing in linux and use cross-compile to linux and windows.
Now I want create some records in database. To do this I create a method SeedData in model class that I need records default. My model class is like this:
type
TUser = class(TObject)
private
FName: string;
public
procedure SeedData;
published
property Name: string read FName write FName;
end;
procedure TUser.SeedData;
begin
//here the method to insert data
end;
So, after the ORM create the database and table, I need that ORM call this function, if this is declared in model class.
I tried some codes, but everytime my TRTTIMethod is nil.
Someone has any sugestion to call this method?
Any help in welcome.
Thanks for help