Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes Multiple one to one mapping (mapping one table to multiple table with one to one mapping) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Multiple one to one mapping (mapping one table to multiple table with one to one mapping)" Watch "Multiple one to one mapping (mapping one table to multiple table with one to one mapping)" New topic
Author

Multiple one to one mapping (mapping one table to multiple table with one to one mapping)

vineet bindal
Greenhorn

Joined: Aug 04, 2011
Posts: 9
Hi,

I want to map my table1 to tbale2, table3, and table 4 by one to one mapping.

I am able to do this by using simple one to one mapping.

Whats the problem?

What i want is if table has 9 rows with id, 1,2,3,4,5,6,7,8,9
tabele2, table3, and table 4 should look , say:

table2 :2,3,4
table3: 1,5,6
table4: 7,8,9

How can i do this in hibernate? can i do this atall?
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

I don't get what you want. Could you explain it a bit further? Hibernate/JPA is used for mapping entities and I doubt that is what you are trying to do here.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple one to one mapping (mapping one table to multiple table with one to one mapping)
 
Similar Threads
Mapping of three tables
inserting values to the database from table
Hibernate - how to map cross-table dependence?
Hibernate Query for multiple tables
concurrent insertion