I have two tables, sysuser and sysrole that I created a class diagram for and added an association between them. Then I added a third class and attached it as an Association Class to the association between sysuser and sysrole. I then synchronized to the ERD and everything looks fine. This was basically following the instructions in a VP YouTube video.
Next, I generated (JPA) Java sources from Visual Paradigm. I can use the new code to access the sysuser and sysrole table without a problem.
However, I cannot figure out how to find the roles that a user has assigned to them, which is by way of the Association Class manifested as a table named sysuser_sysrole, which simply contains the id for a user and role. I don’t think I would have to use a direct query to the DB.
No source files are generated for this table, though I see a private ORM function in each of the Sysuser.java and Sysrole.java files that appears to get this information, as well as many-to-many annotations.
Anyone know what I’m doing wrong? I’m attaching the model and ERD.