How to make TMS XData Server

Hi!

I try to use TMS XData component.
Delphi 10.4, last tria version of Business Tools

I made new XData VCL Server project.
Reversed database in Data Modeller, made er-diagrams in data Modeler, and made pas file in TMS Aurelis part.
Added this file to project. Run it.

I made a request http://localhost:2001/tms/xdata/

and returned list of tables:

value
0
name "group_tasks"
url "group_tasks"
1
name "reg"
url "reg"

But after new request http://localhost:2001/tms/xdata/reg I received blank page.

How to view information in tables?

A blank page suggests an error, first thing ever to do is open the browser console (F12 in most browsers), refresh the page and see what you get in the network request and console. There you have more information: HTTP status code, request headers, response headers, etc..

Note that if you are using TXDataServer component, you have to enable the Automatic CRUD endpoints using the DefaultEntityPermissions property of the component.

Hi, I used DefaultEntityPermissions and received an error:

AureliusConnectionException
AdaptedConnection not specified

I use PostgreSQL maybe it not supported as AdapterConnector?

Can you please let us know the details so we can have an idea about what's going on? What components are you using? Which AdaptedConnection? Which property settings for the components?

Hi, I made a new app through the TMS XData VCL Server wizard.

I get project with data module. It has components:

SparkleHttpSysDispatcher
XDataServer
XDataConnectionPool
AureliusConnection

I added FDConnection with Postgres connection and selected it on AurelisConnection/

Generated pas file in TMS Data Modeler and connected it to project.

Could you add demo video?

There is no much need to do, it should be very simple. I can't guess what's wrong. Can you maybe share your project here?

Project1.zip (1.4 MB)

It's project file.

The application works fine. This is what I get:

Of course, I had to change the TFDConnection params to point to a valid Postgres database in my computer. And I also added a TAureliusDBSchema component to the data module and called this in OnCreate method, so the required tables are created:

procedure TServerContainer.DataModuleCreate(Sender: TObject);
begin
  AureliusDBSchema1.UpdateDatabase;
end;

Of course if your database is created and tables are there, you won't need to add such code.
Other than this, everything works fine.