I've been struggling with modeling something out correctly, the DDD way.
The use case is quite simple. You're a User, and you can be part of a Group. So we have a 1 - many between group and users ( both are aggregates ).
Now, a user should know about it's users , so it contains a list with user ids ( I'm not putting a list of Users in their by purpose ).
But on the other hand, a User should also know in which group he is, so he should have a group id.
The problem here is that we have a bi directional association.
One way I can think to solve this is by not having a group id on the user, but retrieving the group containing the user id.
First of all is this an acceptable solution, if not, could you help me out working away that bi directional relationship ?
Thank you :)