[jboss-user] [Security & JAAS/JBoss] - Re: DatabaseLoginServerModule - query with id possible?
Wolfgang Knauf
do-not-reply at jboss.com
Mon May 11 07:07:10 EDT 2009
Hi Nicole,
I think that this should work:
select userroles, 'Roles' from userroles where roles_id in
| (select roles_id from cmtuser_role where cmtuser_id in
| (select user_id from users where username = ?))
The innermost subselect queries the user ids for a username (can be only one or zero), the outer subselect queries the role ids for this user id, and for those role ids the role names are queried.
Hope that the statement reflects your table structure ;-).
Wolfgang
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230006#4230006
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230006
More information about the jboss-user
mailing list