From: Thomas R. (JIRA) <no...@at...> - 2006-06-03 01:20:18
|
@Column(name="xxxx") does not work when composit key is used ------------------------------------------------------------ Key: ANN-361 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-361 Project: Hibernate Annotations Type: Bug Versions: 3.2.0.cr1 Reporter: Thomas Risberg When using a composit key and specifying name of id column - the specified name is ignored and a column with the name of the field is generated. This: ------------- import java.io.Serializable; public class ProductItemPK implements Serializable { private Long productId; private Long itemId; } ------------- import javax.persistence.*; @Entity @IdClass(value=ProductItemPK.class) public class ProductItem { @Id @Column(name="product_id") private Long productId; @Id @Column(name="item_id") private Long itemId; private String name; } ------------- results in: create table ProductItem ( productId number(19,0) not null, itemId number(19,0) not null, name varchar2(255 char), primary key (productId, itemId) ) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |