Hi,
Imagine the following class (in Hibernate3 3.1).
Code:
public abstract class LabelledEntity {
private String label;
public final String getLabel() {
return label;
}
public final void setLabel(String label) {
this.label = label;
}
}
You can "finalize" methods to ensure that an implementing class does not override them.
I found out that, in a many-to-one association referring to implementors of LabelledEntity, accesses to the "Label" property of a many-to-one referred object are not intercepted by the CGLIBLazyInitializer. This is a bit ugly: one may wonder why his "label" is always null even if it has some label value in the database.
Deleting the "final" decoration of the label property is removing this issue.
Just wanted to share my new knowledge. :-)
Regards,
Stefan Schubert