posting this so that anyone else searching on this will find what i found:

if you have an object with a composite key object, e.g:


  | @Entity
  | @IdClass( ThingPK.class )
  | @Table( name="Thing" )
  | public class Thing
  | implements Serializable
  | {
  |     @Id
  |     private String keyOne;
  | 
  |     @Id
  |     private String keyTwo;
  | 
  |     @Column( name="value_one" )
  |     private String valueOne;
  | 
  |     // getter/setters omitted for brevity
  | }
  | 
  | public class ThingPK
  | implements Serializable
  | {
  |     @Column( name="key_one" )
  |     private String keyOne;
  | 
  |     @Column( name="key_two" )
  |     private String keyTwo;
  | 
  |     // getter/setters omitted for brevity
  | }
  | 

what ended up causing the above problem is that i had annotated the @Columns in 
the entity object (Thing), instead of instrumenting the PK class (ThingPK),  
once i corrected it (to appear like the above), the column name was properly 
injected and it worked fine.  all of the example code i've seen never indicates 
that the @Column instrumentation is supposed to go into the PK class and not 
the entity class.

caveat emptor.

== stanton


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163724
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to