Hi, i have a great problem, i will find a bad legacy data here.
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class name="vo.as400.PfVO" table="sdgtwb_dat.arcpf00f" lazy="false">
<composite-id name="pfvopk" class="vo.pk.PfVOPK">
<key-property name="stagpf" column="stagpf" type="string"/>
<key-property name="modepf" column="modepf" type="string"/>
<key-property name="matepf" column="matepf" type="string"/>
</composite-id>
<property name="de50pf" column="de50pf" type="string" not-null="true"/>
<property name="fl20pf" column="fl20pf" type="string" not-null="true"/>
<many-to-one name="modevo" class="vo.as400.ModeVO" lazy="false" cascade="all" update="false" insert="false">
<column name="STAGPF"/>
<column name="MODEPF"/>
</many-to-one>
<many-to-one name="stagione" class="vo.as400.CStagione" lazy="false" update="false" insert="false">
<column name="STAGPF"/>
</many-to-one>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class name="vo.as400.CStagione" table="sdgtwb_dat.arctb00f" lazy="false">
<id name="cdc_stag" column="cdeltb" >
<generator class="assigned"/>
</id>
<property name="dsc_stag" column="DATITB" type="string" />
<filter name="stagione" condition="CDTBTB IN (:tipo')"/>
</class>
<filter-def name="stagione">
<filter-param name="tipo" type="string"/>
</filter-def>
</hibernate-mapping>
This code work ok in my test table, but in the legacy don't work, i'm looking for the problem, and i see the in my legacy table="sdgtwb_dat.arctb00f" there are the blank space before the code.
for examples
in table A
stagpf 1976 without blank space
in table B
stagmo blankblank1976blankblank
help pelase, how can map this .... I am already hating this schema legacy...
with jdbc i have resolve where TRIM(CDELTB)=? and work but in Hibernate.
I'm using hibernate 3 rc1
Thank's in advance
Devis