File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes a complex one-to-one problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "a complex one-to-one problem" Watch "a complex one-to-one problem" New topic
Author

a complex one-to-one problem

Dekel Yaacov
Greenhorn

Joined: Nov 03, 2008
Posts: 3
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

Joined: Feb 28, 2007
Posts: 1707


Hopefully it works for you!


cmbhatt
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: a complex one-to-one problem
 
Similar Threads
One-to-One mapping problem
help me understand this key mapping in "Hibernate in Action"
Persistance issue
Why is my Hibernate Search query not working?
Struts 1 :- Two Form submission from one jsp using one submit button