XDataProperty on Object (Entity)

Hello Wagner,

I have
[XDataProperty] property Address: TAddress read GetAddress write SetAddress;

A calculated object field.

If I call a service function xyList: TList<TPerson> with $expand=Address everything works fine.
But if I call a "normal" XData.List<TPerson> command with $expand=Address I get an error "Property Address not found".

The results should be identical.

What can I do?

Hi Thomas,

The former is a service operation that works with DTO objects. The latter is an automatic CRUD endpoint, that only works with mapped entities. That is expected behavior.

Ok, I take the service function.

Is there a performance difference between a service function and a direct call to a CRUD endpoint?

1 Like

No, they are similar.