When utilizing proxies, Hibernate knows not to initialize the proxy when the "id getter" or the "id setter" is called because the proxy already contains the id value.
When using field access (in the extraction/injection sense) Hibernate has no idea which methods (if any) constitute the "id getter" and "id setter". The implication being that the proxy is initialized when the methods that are the id field accessors are called.
An "implicit solution" to this would be to infer the getter/setter method names based on the field name (make an assumption that JavaBeans naming is followed).
An "explicit solution" would be letting the user tell us which methods are id accessors.
|