EPropReadOnly error when using XDataClient

I have an entity with some read only properties like:

  TSomeEntity = class
    property SomeProperty: string read GetSomeProperty;

When trying to get a list of this entity with TXDataClient I get an EPropReadOnly exception.

  MyList: TList<TSomeEntity>;
  MyList := XDataClient.List<TSomeEntity>('SomeQuery');  // <<== EPropReadOnly with message 'SomeProperty'

That's expected as the deserializer tries to read the JSON and "convert" it to the object. You can simply add a dummy setter to the property to work it around.

Thanks Wagner,

Well, it looks to me it should just ignore Read Only Properties. Having to create dummy setters does not smells good. Anyway, I'm going with this workaround for now.