Hi all,

Cannot update object in a different table  (sql many-table) for collection type vector.

Here is the Mapping file.  It can successfully retrieve data for the same object but fails to update.

 

<class name="MAGE.OntologyEntry"

             identity="id" key-generator="SEQUENCE" >

<cache-type cache="count-limited" capacity="1000"/>

<map-to table="TT_OntologyEntry"/>

<field   name="id" type="big-decimal">

            <sql name="ID" type="numeric"/>

</field>

<field  direct="true"  name="category" type="string">

            <sql name="category" type="varchar"/>

</field>

<field  direct="true"  name="value" type="string">

            <sql name="value" type="varchar"/>

</field>

<field  direct="true"  name="description" type="string">

            <sql name="description" type="varchar"/>

</field>

<field  direct="true"  name="ontologyReference" type="MAGE.DatabaseEntry">

            <sql name="ontologyReference_ID"/>

</field>

<field  direct="true" name="associations" type="MAGE.OntologyEntry"

             collection="vector">

<sql many-table="TT_association_T_OntologyE"

             many-key="T_OntologyEntry_ID"

             name="associations_ID"/>

</field>

</class>

 

 

 

package MAGE;

public class OntologyEntry  {

 

public String category;

public String value;

public String description;

public DatabaseEntry ontologyReference;

public Vector associations;

 

 

static public boolean cacheEnabled = false;

static public Hashtable cache;

public OntologyEntry() {}

..

..

}

 

Any Idea where the things are getting screwed up?  This may be a bug too as the implementation for entire update is wrong.

 

Avalovin


Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

Reply via email to