-->
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.  [ 2 posts ] 
Author Message
 Post subject: Need Help
PostPosted: Sat Apr 26, 2008 12:23 pm 
Newbie

Joined: Sat Apr 26, 2008 12:16 pm
Posts: 5
Hai Friends

iam new hibernate.
iam working on mapping releationships using annotaions. i have 2 model classes called Bill, and BillCharge where a bill may contain multiple Charges.

i set up the code like this

@Entity
@Table (name="Bill")

public class Bill {

@Id
@GeneratedValue
@Column(name = "BillID")

private int billID;
private int userID;
private int createdByUserID;
private String dueDate;
private int lastUpdatedByUserID;
private Calendar created;
private Calendar updated;
private boolean enabled;
private String status;

getters/ setters ......

}


@Entity
@Table(name = "BillCharge")

public class BillCharge {

@Id
@GeneratedValue
@Column(name = "billChargeID")
private int billChargeID;

private int billID;
private int chargeCode;
private String explanation;
private Date chargeDate;
private int chargeAmount;

getters / setters .........

}



how can i set up the releations using annotaions. i have read the framework doc , but failed to get them in .

plz friends help me to sort this out situation.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 26, 2008 6:20 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
did you find the Annotations reference?
http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/

_________________
Sanne
http://in.relation.to/


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

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.