Actually I want to read property attributes from hibernate mapping file
like property column have values precision , unique , default, scale etc . I want to read these attributes from mapping file of particular table and use it in my program for making some validations.
sample mapping file :
<hibernate-mapping>
<class name="com.test.XYZ" table="TEST" schema="XYZ">
<id name="opid" type="big_decimal">
<column name="OPID" precision="22" scale="0" />
<generator class="assigned" />
</id>
<property name="name" type="string">
<column name="NAME" length="960" not-null="true" unique="true" />
</property>
<property name="description" type="string">
<column name="DESCRIPTION" length="4000" />
</property>
<property name="createcopy" type="big_decimal">
<column name="CREATECOPY" precision="22" scale="0" not-null="true" />
</property>
</class>
</hibernate-mapping>
I want to read unique attribute from property name
If you want some more details please do let me know
--Neeraj
|