Primarily because the static final strings are assigned to a $propertyName 
variable value in the template... and so are the strings in readProperty and 
writeProperty.  Since it's an auto-generated class, there isn't much point to 
using the static string declarations in the read/write properties. The static 
variables are there as a convenience to user-code, so you don't have to 
hard-code the property names (and you get to utilize code completion in your 
IDE), a convenience that I greatly miss when using hibernate. :)


Robert

On Nov 2, 2011, at 11/23:58 PM , stéphane Lestoclet wrote:

> hi,
> 
> for every persistent entity, there is a class automatically generated (its 
> name starts with underscore "_"),
> in those classes, we define property names as static final strings but they 
> are never used by the methods :
> readProperty and writeProperty..
> why ?

Reply via email to