Lieutenant Commander
Lieutenant Commander

How to map a roles table JDBC Driver


I have a JDBC driver, an application that has two intermediate tables. One of users and another of USR_ROLE.

I have roles 30 that have several roles 10 associated.

When I assign a user to a role 30 the user should be inserted in the user table and the roles 10 must be inserted in the USR_ROL table (along with the user id).

How can I do this using the mapping scheme? How does the driver know that a User-Role relationship must be created in the USR_ROLE table?

Thanks for any help

Labels (1)
1 Reply
Knowledge Partner Knowledge Partner
Knowledge Partner

In the mapping all tables are mapped to object classes.

You need to write to a table USR_ROLE that has no matching object class.

I would try to in a policy write attríbute "User-Role" or whatever the table field is to object class USR_ROLE.

That should bypass the mapping table since it is not in it. Actually the mapping table is only a transformation of what is in it, if something is not in it it will simply not be translated.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.