Hi,
first of all thanks for sharing the dataProvider. I have a problem with Many-to-Many relationsships.
A Book has many Authors.
An Author writes many Books.
In React Admin in the books resource I want to display / edit the related authors using ReferenceArrayField / ReferenceArrayInput. The problem is that React Admin expects the following format:
// book as required by React Admin
{
"title": "Book Title",
"auhors": [2,4,5] //just the authorIds
}
Whereas Nest-Crud generates and requires a list of objects with at least idto update the relationship.
// book as required by Nest CRUD
{
"title": "Book Title",
"auhors": [{"id": 2}, {"id": 4}, {"id": 5}] //objects
}
What would you recommend? Can this issue be solved in the dataProvider or elsewhere in React Admin? Or is it best to solve it on the server side, e.g. with an interceptor?
Hi, first of all thanks for sharing the dataProvider. I have a problem with Many-to-Many relationsships.
A
Book
has manyAuthors
. AnAuthor
writes manyBooks
.In React Admin in the
books
resource I want to display / edit the relatedauthors
usingReferenceArrayField
/ReferenceArrayInput
. The problem is that React Admin expects the following format:Whereas Nest-Crud generates and requires a list of objects with at least
id
to update the relationship.What would you recommend? Can this issue be solved in the
dataProvider
or elsewhere in React Admin? Or is it best to solve it on the server side, e.g. with aninterceptor
?Thanks!