Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help for Mapping tow BOs

 
Kiran Mallela
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic