I'm new to Java EE and I have a problem to add relation to an entity.
I've the following entities:
All works fine except when I try to relate a printer to an user. The first time the relation is written in the db. If I try to add another printer to the same user, I loose the first relation. I'm not able to add more than one printer to the same user. I tried a lot of solutions without result, the following is the last attempt to solve the problem.
Part of UsersEJB.java
Part of PrintersEJB.java
How can I solve the problem? Someone know book/sites where I can find real examples to use all the relations?