Using hibernate-annotations-3.2.0-GA.
When using an @Embedded composite element, and overriding the column names like this:
Code:
@Embedded
@AttributeOverrides( {
@AttributeOverride(name="extention", column = @Column(name="phone1_ext") ),
@AttributeOverride(name="number", column = @Column(name="phone1_number") )
} )
public PhoneNumber getPrimaryPhone() {
return _primaryPhone;
}
The schema generator does not obey to the the other annotations in the embedded class. For example:
Code:
@Embeddable
class PhoneNumber {
@Basic
@Length(min=0,max=6)
public String getExtention() {
return _extention;
}
}
In this case, the resulting schema looks like:
Code:
phone1_ext varchar(255),
The lenght should be 6, not the default 255.
I don't see any way to override any other annotiation beside the @Column, and in fact, I would prefer not having to do it. Any suggestions?
Thank you.
Cedric