These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Best way question on design from beginner
PostPosted: Mon Dec 13, 2004 4:52 pm 
Newbie

Joined: Mon Dec 13, 2004 7:06 am
Posts: 2
Location: Orange NSW Australia
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.