When I add something like the following to my annotated class:
@Embedded
@AttributeOverrides({
@AttributeOverride( name = "filePath", column = @Column(name = "abcFilePath", nullable = true))
})
private FileWrapper fileWrapper;
My expectation is that my generated table will have a column “abcFilePath”. This works fine if FileWrapper has a variable named filePath, but if FileWrapper extends some other class that has a variable named filePath (and the respective getter/setter methods), then table will not have the column “abcFilePath”.
How should I specify the override when the variable is in a superclass?
I found a workaround by specifying:
private String filePath;
… in my FileWrapper class (but no additional setter/getter required).
WRT the regression in the (edited) topic title, I am migrating code from Hib3 to Hib5 and what used to work in Hib3 does not work with the equivalent in Hib5 e.g.:
<component name="fileWrapper" class="FileWrapper">
<meta inherit="false" attribute="scope-get">public</meta>
<meta inherit="false" attribute="scope-set">public</meta>
<property name="filePath" type="string">
<column name="abcFilePath" not-null="false" />
</property>
</component>