Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

a complex one-to-one problem

 
Dekel Yaacov
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm having a problem defining one-to-one.
I have 4 objects:
1.Manager
2. Employee
3. Customer

4. Address

Each of the objects 1-3 has a column called Address_Id and it supposed
to load (or create new) the address from the ADDRESS table.

How do I specify in my mapping files that the column Address_Id is
actually the pk called Id in the Address class/table?

many thanks
D
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hopefully it works for you!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!