wood burning stoves 2.0*
The moose likes JSF and the fly likes JSF and composite primary key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF and composite primary key" Watch "JSF and composite primary key" New topic
Author

JSF and composite primary key

Don Quixote
Greenhorn

Joined: Jul 31, 2011
Posts: 1
Good staff. I created a web application with JAAS authentication. I followed the manual to the letter of Java EE, I created a user table (+login, password) and another group (+group_name, +login). Note that the + symbol represents the primary key. Managed to get JAAS to work, using jdbc realm and Form based authentication.

I generated the CRUD in NetBeans 6.9.1 for the two entities, user and group. It turns out that on page Create.xhtml to user, it appears only two text boxes, one login and one for password. Then I added a combobox that allows select group names defined statically. Thus, the login and password are saved in the user table, and the login name and the group selected in the table group.

It turns out that I am having trouble saving data in the table with composite primary key, which is the group table. Has anyone had this problem?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF and composite primary key
 
Similar Threads
Hibernate many-to-one composite key as foreign key
Composite key mapping
weblogic user authentication in java
Hibernate foreign key
JDBCRealm and Form Login