This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Hibernate] How to model/map lookup tables

 
Junilu Lacar
Bartender
Pie
Posts: 7319
45
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've found precious little out there about how to model and map lookup tables in Hibernate (see http://raibledesigns.com/page/rd?anchor=dynamic_queries_with_hibernate).

Simple examples:

Address
-------
stateCode (FK)


State (lookup for StateNames)
-----
stateCode (PK)
stateName

----
Another:


LineItem
---------
itemCode (FK)


Item
----
itemCode (PK)
itemDesc


Any and all tips appreciated. TIA!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic