Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Object Relational Mapping and the fly likes Help for Mapping tow BOs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
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://aspose.com/file-tools
 
subject: Help for Mapping tow BOs
 
Similar Threads
one to one unidirectional mapping in jpa
mutex on multiple cpus
Excepion: mapping cannot have columns in this context(JPA/OpenJPA OneToMany using single table)
question about entity PK
Need an idea regarding my billing application.