-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hai help me for this problem?
PostPosted: Sat Sep 25, 2010 1:05 am 
Newbie

Joined: Sat Sep 25, 2010 12:50 am
Posts: 1
Location: INDIA
DB structure:
table users
id INTEGER (PK) AUTO_INCREMENT
username VARCHAR
password VARCHAR

table user_address
user_id INTEGER (PK)
city VARCHAR
state VARCHAR
country VARCHAR
CONSTRAINT `user_address` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)

Class:
public class User implements Serializable {
private int id;
private String username;
private String password;
private Address address= new Address();
getters & setters

}
public class Address implements Serializable {
private int userId;
private String city;
private String state;
private String country;
getters & setters
}
For the above details pls send me the User.hbm.xml & Address.hbm.xml


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.