-
Hi. Started to work with refine and tried to use a REST API provided with PostgREST, which serves RESTful API from any Postgres database. Is it correct that refine expects Id-attributes in every used resource? My API doesn't provide Id-attributes as the underlying tables don't provide them. Instead you can query the resources for example with the primary key attributes of the underlying tables. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey @gschader , For example, You can check the PostgREST dataProvider of Please do not hesitate to contact us wherever you are stuck. |
Beta Was this translation helpful? Give feedback.
Hey @gschader ,
You can handle this with the
metaData
property in data hooks, forms, and tables.For example,
if you don't have an id field in a table and you can pass your primary key attributes to
dataProvider
usingmetaData
.You can check the PostgREST dataProvider of
react-admin
for ideas,https://github.com/raphiniert-com/ra-data-postgrest/blob/2c9ff6840122e059cc05910f61f1336b149d9225/src/dataProvider/index.ts
Please do not hesitate to contact us wherever you are stuck.