AttributeOverride ignores column name for "xRay" property (or apparently any
property with a single initial lowercase property)
-------------------------------------------------------------------------------------------------------------------------------
Key: ANN-773
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-773
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.0.ga
Environment: hibernate3, hsqldb 1.8.0.9
Reporter: Tobin Edwards
Hibernate generates these column names in the database (note that XRAY column should be
VISION_XRAY):
XRAY BOOLEAN,
VISION_BLIND BOOLEAN,
VISION_LASER BOOLEAN
when using the following classes:
@Embeddable
public class Vision
{
public Vision()
{
}
private Boolean blind;
public Boolean getBlind() { return this.blind; }
public void setBlind(Boolean value) { this.blind = value; }
private Boolean xRay;
public Boolean getXRay() { return this.xRay; }
public void setXRay(Boolean value) { this.xRay = value; }
private Boolean laser;
public Boolean getLaser() { return this.laser; }
public void setLaser(Boolean value) { this.laser = value; }
}
@Entity
public class SuperHero
{
private Long _id;
@Id
@GeneratedValue
public Long get_id() { return this._id; }
public void set_id(Long id) { this._id = id; }
private Vision vision;
@Embedded
@AttributeOverrides (
{
@AttributeOverride(name="blind",
column=@Column(name="vision_blind") ),
@AttributeOverride(name="xRay",
column=@Column(name="vision_xRay") ),
@AttributeOverride(name="laser",
column=@Column(name="vision_laser") )
} )
public Vision getVision() { return this.vision; }
public void setVision(Vision value) { this.vision = value; }
}
--
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