Code:
@MappedSuperclass
public class BaseAuditedExternalIdItem extends AuditedIdItem implements ExternalItem {
private String _externalId;
@Column(name="externalId", nullable=false, length=30)
public String getExternalId() {
return _externalId;
}
}
Code:
@MappedSuperclass
//doesn't work//@AttributeOverride( name="externalId", column = @Column(nullable=false, length=50) )
public abstract class WorkOrderUpdate extends BaseAuditedExternalIdItem {
}
Code:
@Entity
@AttributeOverride( name="externalId", column = @Column(nullable=false, length=50) )
public class OrderUpdate extends WorkOrderUpdate {
}
Code:
@Entity
@AttributeOverride( name="externalId", column = @Column(nullable=false, length=50) )
public class LoadUpdate extends WorkOrderUpdate {
}
I'd like to just have the AttributeOverride in WorkOrderUpdate, since I want it to be 50 in both LoadUpdate and OrderUpdate. However, I could only get it to work when overriding in LoadUpdate and OrderUpdate, not WorkOrderUpdate. (When I say "work", I mean getting 50 as the column length from AnnotationConfiguration.getTableMappings().)