Relative Content

Tag Archive for springmongodbspring-bootspring-securityspring-data

How to know what to use unidirectional or bidirectional in a MongoDB class

So am working on Spring Boot project that help teachers group students , schedule sessions…
and i have this two classes user and group the problem is i don’t know if its better to make it bidirectional (like it is now) or to make it unidirectional by removing groups ref inside of the user because i thought that if i am going to find all groups that belongs to user x in his groups list its easier than finding all group that user x is part of from all the groups and same goes the other way.