System Information
- Strapi Version: 4.9.2
- Operating System: Windows 11, x64
- Database: postrges
- Node Version: v16.17.0
- NPM Version: 8.18.0
- Yarn Version: None
Helo!
I create a collection X and Y. In X I added a relation field “X has and belongs to one Y”. I also made sure the relation is not marked as private. When I call public api findOne
on X, the ID of Y is not returned. I read that I have to use the populate
query, but in order to do so, I must also open public find
api for Y. But I do not want the client side to be able to do find
calls on Y (getting a list, etc.).
This all at moment doesn’t make much sense to me, because ideally the ID should be there without populating
query, and if I do populate findOne
on Y should be enough.
Maybe someone can shine a light on this for me and suggest something, please.