File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Help for Mapping tow BOs" Watch "Help for Mapping tow BOs" New topic

Help for Mapping tow BOs

Kiran Mallela

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

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:
subject: Help for Mapping tow BOs
It's not a secret anymore!