We are having some issue with related data :
We have a one-to-many relationship between an Artist and his Medias generated by Lumber (I don’t see any problem in the generated models)
The relationship itself works perfectly fine, I can locally access the medias when calling [forestUrl]artists/[artistId]/relationships/artistsMedias/
Moreover, the ArtistMedia table is correctly linked to the corresponding artist (that being said, we also have an issue here, because the artist name does not display right away, we have to go to the media details and then back for it to be displayed properly, I’ll dig into this later)
When i’m opening an artist detail, I can see the related table under the related data section, but when going there no record is shown.
It doesn’t look like they are not found, because the searchbar shows the right number of medias ("search within XXX medias), rather it looks like no call is made to retrieve the medias.
When looking at the network tab, I can see :
1- The call to /artist/[artistId] that gets the attributes and relationships (amongst which the Medias)
2- When going to the related data tab, the call to /artists/[artistId]/relationships/media/count that gets the right number (thus the right number in the searchbar, i suppose)
But no call to get the actual medias
My guess is that no call is made if the related data is not set to be seen in the UI settings, but I don’t get why nothing is displayed in this case, since everything seems to work fine.
Should they be retrieved in one go when getting the artist details, or is there a trick to perform an additional call to get the medias?
If i am being unclear, I will provide some screenshots for explanation
Thanks in advance!
- Package Version:
- Express Version: 4.16
- Sequelize Version: 5.15
- Database Dialect:
- Database Version:
- Project Name: