< /p>
Пользователь может быть во многих группах
У группы может быть много пользователей. < /p>
Я сделал userdao, а Groupdao < /p>
Пользовательские и групповые классы имеют оба:
list group /> Но «бесконечная рекурсия, вызванная этим алгоритмом:
Если я хочу загрузить пользователя: < /p>
Код: Выделить всё
1 load the user data,
2 read every groups which the user is member
3 for every group, load that group.
4 but to load the group i have to read every user data and add them in the List members.
5 to read every user data: will lead to load their data
6 repeat again from 1 for every user that is member.
Подробнее здесь: https://stackoverflow.com/questions/794 ... ny-to-many
Мобильная версия