There is no attribute size
to override in StorageSizeTBPerMonth
. It does have embedded field storage
which holds attribute size
. That's why storage.size
is way to go:
@Embedded
@AttributeOverrides({ @AttributeOverride(name = "storage.size", column = @Column(name ="storage_low")) })
private StorageSizeTBPerMonth limitLow;
// ...
@Embedded
@AttributeOverrides({ @AttributeOverride(name = "storage.size", column = @Column(name = "storage_high")) })
private StorageSizeTBPerMonth limitHigh;
In JPA 2.0 specification this is told with following words:
To override mappings at multiple levels of embedding, a dot (".") notation form must be used in the name element to indicate an attribute within an embedded attribute. The value of each identifier used with the dot notation is the name of the respective embedded field or property.