Hibernate version:2.1
Mapping documents:NA
Code between sessionFactory.openSession() and session.close():NA
Full stack trace of any exception that occurs:NA
Name and version of the database you are using:Informix 9
The generated SQL (show_sql=true):NA
Debug level Hibernate log excerpt:NA
Hi Everyone,
I need to display a html table using JSP of all the records in my user table with their role name from the role table. The link is the role_id which is a FK in the user table. ( so one role many users ).
What is the best way to approach this as far as DAO and joins go? Do I really need a join? (seems to be several options from the docs I have read)
Later, I will need to be able to edit/add user records and display to the administrator the role name to be associated with each user. (in a select box) but never have to edit the role table itself.
thanks
Bill
tables
create table 'fgatedev'.fguser (
fguser_id SERIAL not null,
role_id INT,
userid CHAR(8),
wamikey CHAR(12),
givennames VARCHAR(50),
surname VARCHAR(30),
password CHAR(12),
vk_id INT,
edit_dt DATE default TODAY
)
create table 'fgatedev'.role (
role_id SERIAL not null,
role_name VARCHAR(30),
role_desc VARCHAR(50),
vk_id INT,
edit_dt DATE default TODAY
)
_________________ thanks
Bill Marriott
|