db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabian Baum" <jetspe...@gmx.de>
Subject junction entity
Date Mon, 26 Jan 2004 15:45:45 GMT
Hi all,

I have a junction entity looking like 

<table name="a2c" description="a2c"
    javaName="a2c" idMethod="native" javaNamingMethod="nochange">
      <column name="ID"
            required="true"
            primaryKey="true"
                type="INTEGER"
        autoIncrement="true"
            javaName="ID"
                javaNamingMethod="nochange"
      description="the id"/>
          
          <column
            name="aID"
            required="true"
            type="INTEGER"
            primaryKey="false"
            javaName="aID"
            javaNamingMethod="nochange"      
            description="aID"/>

<column
            name="cID"
            required="true"
            type="INTEGER"
            primaryKey="false"
            javaName="cID"
            javaNamingMethod="nochange"      
            description="cID"/>

    
        <foreign-key foreignTable="A"
            name="fkA2C"
            onUpdate="none"
            onDelete="none">
            <reference 
              local="aID"
              foreign="someID"/>
     </foreign-key>


if I want to update this table using a2cPeer and Criteria, how can I do this
?
The problem is, that this is a n:m relationship, so the only way I see is to
read this table first and compare the data to the data I want to update.
Then I would delete or insert the rows that are different.
Is there another way without using the a2c object and its save method ?

Thanks for your help !!!

Fabian

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message