Hi!

I don't know wether this is a bug or required by the spec.  However, I couldn't 
figure how to file it into JIRA as an unregistered user, and JIRA wouldn't let 
me register as a new user, so I have to post it here.

If you make differences in how you annotate the fields in 
I have this simple class:


  | @Embeddable
  | public class BlaPK
  |     implements Serializable {
  | 
  |     private Long id;
  | 
  |     private Integer type = TYPE_UNSPECIFIED;
  |     
  |     @Column(name="bla_pk_id")
  |     public Long getId() {
  |         return id;
  |     }
  | 
  |     public void setId(Long id) {
  |         this.id = id;
  |     }
  | 
  | 
  |     @Column(name="bla_pk_type")
  |     public Integer getType() {
  |         return type;
  |     }
  |     public void setType(Integer type) {
  |         this.type = type;
  |     }
  | }
  | 
  | 
  | @Entity 
  | public class Foo implements Serializable {
  |     @Id
  |     private Long id;
  | 
  |     @Embedded
  |     private BlaPK bla;
  | 
  |     // getters and setts for id/bla
  | }
  | 

JBoss will throw a "duplicate column id" error for class Foo.  It doesn't seem 
to see the @Column name override in the @Embeddable class which are set on the 
getters.

This used to work in JBoss 4.0.3SP1.  However, in 4.0.4RC1 I have to move the 
annotations in the BlaPK class to the fields as well.  I have the impression 
JBoss makes a lookup for class Foo and sees field-wise annotations, and hence 
doesn't recognize the annocations at the functions when it inspects the 
@Embedded class.

I don't know if this required by the spec, if not, take this as a bug report 
(and again, sorry for not filing in JIRA).




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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to