[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-361?page=all ]
Emmanuel Bernard updated ANN-361:
---------------------------------
Summary: HA takes metadata from IdClass rather than the entity itself (was:
@Column(name="xxxx") does not work when composit key is used)
HA takes metadata from IdClass rather than the entity itself
------------------------------------------------------------
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira