Anyone know of places where we document ColumnTransformer read-fragment
handling as qualifying columns other than the column the transformer is
attached to?  E.g., consider:

@Column( name="dob" )
@ColumnTransformer( read="SYSDATE - dob / 365", ... )
public int getAge() { ... }

Currently, Hibernate will try to qualify both "SYSDATE" and "dob" with
table alias.  The simple fix is to simply limit the qualification to the
column that the transformer is attached to ("dob").  Just want to make sure
that we do not document anywhere that multiple column references will all
be replaced.  E.g. (contrived):

@Column( name="dob" )
@ColumnTransformer( read="(SYSDATE - dob / 365) + offset", ... )
public int getAge() { ... }

The question is whether both "dob" and "offset" columns will get
qualified.  Allowing this is much more involved, requiring that we somehow
allow configuration of all the referenced columns that should be qualified
(which has its own set of difficulties when it comes to multi-table

I propose the simple solution, unless there are any objections
hibernate-dev mailing list

Reply via email to