Just done this this morning: CREATE VIEW fw_user_roles AS SELECT USERS.USER_NAME AS USER_NAME, ROLES.NAME AS ROLE_NAME FROM fw_users AS USERS, fw_user_role_rltns AS RLTNS , fw_roles AS ROLES WHERE USERS.DATA_KEY = RLTNS.PRIMARY_KEY AND ROLES.DATA_KEY = RLTNS.SECONDARY_KEY ORDER BY USER_NAME, ROLE_NAME
Unfortunately looks like I may have to update my version of mysql to 5.??? -----Original Message----- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 02 March 2005 11:24 To: Tomcat Users List Subject: Re: realm configuration Use a view -Tim Nathan Coast wrote: > Hi, > > I have the following db structure for my user / role tables: > > User User-Role Role > ---------- ----------- ---------- > id ------ user_id > username rold_id ------- id > password rolename > > > Is there a realm implementation that support this structure? > > AFAICT, the JDBC and DataSourceRealm classes require the following > structure: > > User User-Role > ---------- ----------- > username ------ username > password role_name > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
