agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

GET - Inheritance support - Cayenne backend #584

Closed andrus closed 1 year ago

andrus commented 1 year ago

Ag model is unaware of inheritance. Let's start adding support for inheritance step-by-step. This task is to make sure GET requests with Cayenne backend could render when fetching a superclass of the hierarchy. Subclasses should render their own properties as defined in the model.

The underlying work will mostly focus on building an inheritance-aware AgEntity and ResourceEntity. So while the entity API will be generic, looks like initially only Cayenne "compiler" will be able to produce inheritance information. A generic POJO case will not be handled, as entities are compiled on-demand and have no knowledge of Ag-enabled subclasses.