agrestio / agrest

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

Redesign of AgEntity ID model - allow relationships as part of id #464

Closed andrus closed 3 years ago

andrus commented 3 years ago

The recent work on exposing Ag metadata (#459) highlighted a number of shortcomings of the current entity metadata model in regards to ID handling, such as leaking of DB column names in IDs (#463).

And here is another one - logically from the Agrest perspective an ID can be comprised from a combination of attributes and relationships, but currently we can represent it only as a set of attributes. This spills over to things like ID handling in EntityUpdate, etc.

This task is an attempt to straighten the ID model of AgEntity:

The hope is that this would allow to fix the inconsistencies per #463, ID representation in EntityUpdate, etc. and generally present a consistent universal ID model not tied to the database structure.

Upgrade Notes

andrus commented 3 years ago

This is too big of a departure from the current ID model. Will not be pursuing this, and will look for alternative solutions to ID issues.