This content has been marked as final.
Show 3 replies
-
1. Re: How to map this?
waynebaylor Sep 13, 2007 9:56 AM (in response to lafr)is this a bi-directional relationship? can you post the Part entity code?
-
2. Re: How to map this?
lafr Sep 13, 2007 6:09 PM (in response to lafr)No, it's uni-directional.
So in the part bean I have the key-fields marked with id and so on. No hint that part is used in a relation.@Entity @IdClass(value=Part.PK.class) @Table(name="part") public class Part implements Serializable { @Id @Column(name="msghd_serial") private Integer msghdSerial; @Id @Column(name="part_no") private Integer partNo; ...
-
3. Re: How to map this?
waynebaylor Sep 14, 2007 10:45 AM (in response to lafr)hmm, when using @OneToMany and @JoinColumn Hibernate puts the FK in the Part table...so you shouldn't have a conflict. Maybe try removing the referencedColumnName attribute and see what happens.