In ejb-3_0-pfd-spec-persistence.pdf
anonymous wrote : 9.1.31 PrimaryKeyJoinColumns Annotation
  | @Target({TYPE}) @Retention(RUNTIME)
  |     public @interface PrimaryKeyJoinColumns {
  |     PrimaryKeyJoinColumn[] value();
  | }
It annotated @Target({TYPE}) , not @Target({TYPE,METHOD}). So, it means 
@PrimaryKeyJoinColumns disallowed annotated Method.

Example 2: OneToOne relationship between Employee and EmployeeInfo 
classespublic class EmpPK {
  |     public Integer id;
  |     public String name;
  | }
  | @Entity
  | @IdClass(com.acme.EmpPK.class)
  | public class Employee {
  |     @Id Integer id;
  |     @Id String name;
  |     @OneToOne
  |         @PrimaryKeyJoinColumns    ({
  |          @PrimaryKeyJoinColumn(name="ID", referencedColumn-
  | Name="EMP_ID"),
  |          @PrimaryKeyJoinColumn(name="NAME", referencedColumn-
  | Name="EMP_NAME")})
  |     EmployeeInfo info;
  |     ...
  | }
  | @Entity
  | @IdClass(com.acme.EmpPK.class)
  | public class EmployeeInfo {
  |     @Id @Column(name="EMP_ID")
  |     Integer id;
  |     @Id @Column(name="EMP_NAME")
  |     String name;
  |     ...
  | }

but, in it's example, it can annotated Method. so i am babel.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932026#3932026

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932026


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to