scooter4j wrote:
so.... can you join a table that is represented by a persistent class with a table that isn't represented by a persistent class? What I have is this:
A Roles table (persistent class = Roles), a userId, and a join table (UserRoles; no associated persistent class) that has various roleIds for a userId. So, I'm coming in knowing my userId and I want to retrieve a List of Role objects by joining the Roles table with the UserRoles table where Roles.roleId = UserRoles.roleID and UserRoles.userId = userId.
Scott
I think you'll find your answer in the docos. Read up on many-to-many. (BTW, I've implemented this exact schema many times and it works just fine... you are but a few lines of code away). :)