This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Help for Mapping tow BOs Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Help for Mapping tow BOs" Watch "Help for Mapping tow BOs" New topic
Author

Help for Mapping tow BOs

Kiran Mallela
Greenhorn

Joined: Aug 11, 2009
Posts: 4
Hi to all,
I have two business objects like this

public class Person{
private int pid;
private String name;
private Phone phone;
}

public class Phone{

private long number;

}

can you any one Help me for mapping these two BOs in hibernate.
<***Phone doesn't contains pid>
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Welcome to JavaRanch!

Please see the JavaRanch naming policy and change your display name to conform with this policy. Thanks!

Also, Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read.

Have you read any of the Hibernate mapping tutorials available on the web? It's almost always quicker to SearchFirst, especially when it's a general question easily answerable through other mechanisms.
 
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: Help for Mapping tow BOs
 
Similar Threads
one to one unidirectional mapping in jpa
question about entity PK
Excepion: mapping cannot have columns in this context(JPA/OpenJPA OneToMany using single table)
mutex on multiple cpus
Need an idea regarding my billing application.