Hibernate version: 3.0.5
Mapping documents:
Code:
<id
name="internalId"
type="long"
column="THE_ID"
>
<generator class="com.mycompany.RandomLongGenerator">
<param name="idLength">5</param>
</generator>
</id>
I have implemented Configurable and IdentifierGenerator and need to know the length of the id, but as you see in the snippet above, I had to add that as a "param". What I would like is to define the length attribute directly in the id element, and then access that length through Hibernate's API. For example,
Code:
<id
name="internalId"
type="long"
column="THE_ID"
length="5"
>
<generator class="com.mycompany.RandomLongGenerator" />
</id>
However, the methods I implement only pass me Type, Properties, Dialect and SessionImplementor, and I can't find any way to get to the PersistentClass or Table, or Column, etc. by using those arguments.
Thanks for any help...