posted 16 years ago
hello,
I have 3 tables in my database:
ROLE (ID_ROLE, DESCRIPTION)
ROLE_PERSON (ID_ROLE, ID_PERSON)
PERSON (ID_PERSON, NAME)
and mapped them as a ManyToMany-Relation:
The relationship works well by doing some HQLs (JPA-QLs). But when I want to persist a new Person-Instance, the following stacktrace occurs:
This is my session-bean:
This is my view to obtain the list of selected roles (this works):
The persist works only, if the user will not select any roles. Then a person-instance with its name and id will be stored in the database. By persisting any roles, the stacktrace above occurs.
I have tried a lot but I cannot solve the problem.
Any Idea, how I can solve that problem??
Thanks.