KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > annotations > cid > Child


1 //$Id: Child.java,v 1.2 2005/06/20 17:11:01 epbernard Exp $
2
package org.hibernate.test.annotations.cid;
3
4 import javax.persistence.AccessType;
5 import javax.persistence.EmbeddedId;
6 import javax.persistence.Entity;
7 import javax.persistence.AttributeOverride;
8 import javax.persistence.Column;
9
10 /**
11  * Entity having a many to one in its pk
12  * @author Emmanuel Bernard
13  */

14 @Entity(access=AccessType.FIELD)
15 public class Child {
16     @EmbeddedId
17     @AttributeOverride(name="nthChild", column=@Column(name="nth"))
18     public ChildPk id;
19 }
20
Popular Tags