• Post Reply Bookmark Topic Watch Topic
  • New Topic

CRUD with foreign keys  RSS feed

 
John Morgan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to work with a SQL database and some JSF pages that were created with/for CRUD. The data comes up just fine but all my foreign keys show the primary key for the key not the data. So instead of having the actual Zone I get the number (my primary key) that matches the Zone.

example:
4717 A Cool Reception Title: Gatherer of Cool Company com.vancowboy.lotor_db.LotroZones[ id=11 ]

The last item should read "All" not "com.vancowboy.lotor_db.LotroZones[ id=11 ]"

Any suggestions?

(Oh and this was straight from a tutorial so I can learn this but the FK has got me baffeled).

Thanks.
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really don't know what that's all about. My best guess is that you're employing a database model object's "toString" method to display a value.

JSF will display whatever you tell it to display, but we need to know what you're telling it.
 
John Morgan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that is it... The index key is an integer where as the actual information is a string value.... now to start tracking it down. Thank you for putting me on the right path.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!