aspose file tools*
The moose likes Object Relational Mapping and the fly likes [Hibernate] How to model/map lookup tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[Hibernate] How to model/map lookup tables" Watch "[Hibernate] How to model/map lookup tables" New topic
Author

[Hibernate] How to model/map lookup tables

Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

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!


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Hibernate] How to model/map lookup tables