I have been trying to get the Hibernate mapping metadata from the Configuration class for the last day and I have almost everything that I need except when it comes to getting the hibernate column name to database column name mapping.
I have looked at ClassMetadata, RootClass, SimpleValue, EntityPersister but I cannot find the API that I need.
The farthest I have been able to get is the database column's name but no corrilation of the Hibernate column name to the db name.
What have I missed?
Thank you very much,
David
Hibernate version: 2.1.7c
Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="com.relevant.BizWiz.dao.Gag"
table="gag"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="gag"
</meta>
<composite-id>
<meta attribute="field-description" inherit="false">
@hibernate.id
generator-class="assigned"
</meta>
<key-property
name="gagFamgroup"
column="gag_famgroup"
type="java.lang.String"
length="8"
>
<meta attribute="field-description">
@hibernate.property
column="gag_famgroup"
length="8"
</meta>
</key-property>
<key-property
name="gagFamilyid"
column="gag_familyid"
type="java.lang.String"
length="20"
>
<meta attribute="field-description">
@hibernate.property
column="gag_familyid"
length="20"
</meta>
</key-property>
</composite-id>
<property
name="gagComments"
type="com.relevant.util.hibernate.StringType"
column="gag_comments"
not-null="true"
length="200"
>
<meta attribute="use-in-tostring">true</meta>
<meta attribute="field-description">
@hibernate.property
column="gag_comments"
length="200"
not-null="true"
</meta>
</property>
<property
name="gagSeqno"
type="short"
column="gag_seqno"
not-null="true"
length="5"
>
<meta attribute="use-in-tostring">true</meta>
<meta attribute="field-description">
@hibernate.property
column="gag_seqno"
length="5"
not-null="true"
</meta>
</property>
<property
name="gagMsgno"
type="com.relevant.util.hibernate.IntType"
column="gag_msgno"
not-null="true"
length="10"
>
<meta attribute="use-in-tostring">true</meta>
<meta attribute="field-description">
@hibernate.property
column="gag_msgno"
length="10"
not-null="true"
</meta>
</property>
<property
name="gagLmdte"
type="java.sql.Timestamp"
column="gag_lmdte"
length="23"
>
<meta attribute="use-in-tostring">true</meta>
<meta attribute="field-description">
@hibernate.property
column="gag_lmdte"
length="23"
</meta>
</property>
<property
name="gagRbs"
type="com.relevant.util.hibernate.StringType"
column="gag_rbs"
length="1"
>
<meta attribute="use-in-tostring">true</meta>
<meta attribute="field-description">
@hibernate.property
column="gag_rbs"
length="1"
</meta>
</property>
<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- end of derived association(s) -->
</class>
</hibernate-mapping>