在MVC应用程序上,我有此表:
TSQLUser = class(TSQLSomeone)
private
published
end;
TSQLContact = class(TSQLSomeone)
private
published
end;
TSQLProject = class(TSQLRecordTimeStamped)
private
fUsers: TIntegerDynArray;
fContacts: TIntegerDynArray;
...
published
property Users: TIntegerDynArray index 2 read fUsers write fUsers;
property Contacts: TIntegerDynArray index 2 read fContacts write fContacts
...
end;
在MVC应用程序上,我需要发送以查看所有项目以及与任何项目相关的所有用户。我想要这样的JSON指令:
"contacts":
[
{
"ID": 1,
"LastName": "aaa",
"FirstName": "ssss",
"Users":
[
{
"LastName": "bbb"
"FirstName": "ddd",
}
],
"Contacts":
[
{
"LastName": "bbb"
"FirstName": "ddd",
}
]
}
],
如何从TSQLRest中提取数据?