According to Hibernate's (3.6.0) spec section 21.1.3 ("Single-ended association proxies"), such a proxy can't be constructed
by Hibernate if it contains "any final methods".
My question is, does this restriction apply to getters/setters of persistent fields only or really to any method in an entity class?
So, does a method like this one:
Code:
public final String toString() {
return this.getClass().getSimpleName() + id;
}
really prevent the creation of a (CGLIB or Javassist) proxy for this entity?
Does it matter if field-based or property access is used? Since CGLIB was replaced by Javassist, does this provide any more features in this direction?
I like to use inheritance in my entity hierarchy and hence the requirement to define some final methods,
for example, in the base class to prevent subclasses from overriding those methods.
thanks in advance!
Robin.