I would like to generate column-names for user-types.
For example if I have the userType Value have the following maping
<property name="deliveredAmount" type="my.customtype.ValueUserType">
For every time I use my UserType I have to define the columns of the property when my usertype has more than one column.
I would like to generate the column-names automatically:
So I supplied a patch where a UserType can implement an Interface which will supply the column name extensions for the usertype.
So the extensions are "Value" and "UnitOfMeasure" for the above example. Now hibernate can compose the column-name from the property-name and the extensions.
If there are column supplied in the mapping, then we use them instead of the extensions. ( See the patch )
Is this a good solution ?
Do you now a better alternative ?
Could you apply this patch ?
To run this patch go to the hibernate-3.1 directory.
patch --binary -p1 < extensionsColumns.patch
I applied the --binary parameter to prevent CR/LF problems.
Hibernate 3.1 rc3
Sorry, this is too big a conceptual change.
Thank you for your reaction,
I understand that you will not change this for 3.1.
Maybe you could apply it for the next release. Or do you think it is not needed ?
It is not needed.