• Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple mapping issue for Hibernate newbie  RSS feed

Tom Collins
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a one-to-many relationship (at least I think) between a product and production state table. A product can be in only one of the pre-defined states of production at a time (e.g. "in production", "inspection", etc.) The product table has a foreign key called production_state_id. Because the production state table only has a primary key and a description, it really doesn't merit an object in Java.

I currently have a product object which contains a string indicating its state of production. My question: how do I map this relationship? This is probably a ridiculously simple problem, but for all the reading up I've done, I can't find an answer for this situation. The following is my mapping file for the product (Note: I used product throughout the post as a generic term for the industry specific product "die" - i.e. tool & die).

Rashid Darvesh
Ranch Hand
Posts: 189
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!