db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Barré <Guillaume.Ba...@technomedia.ca>
Subject Strange conditions in query
Date Tue, 06 Apr 2004 13:39:28 GMT
Hello,

 

I used Torque 3.0 with Jetspeed 1.4 and I have strange conditions in BasePeer query.

 

Example :

 

1/ For a doUpdate(..)  I have this type of condition "BasePeer.doUpdate: whereClause=ID=1"
where field ID is PK of my table

 

2/ For a doDelete(...)  this type "whereClause=CONTENT_TYPE='COURSE_TYPE_AICC_APPLET' AND
ID=2 AND COURSE_SUPPLIER_ID=1" where only ID field represents the table PK.

 

In fact for all the doDelete actions the generated condition contains all table fields, Pk
or not. 

 

So could tell me if this is a normal behavior?

May be something is wrong in my torque configuration file????

 

Thanks in advance.

Guillaume

 

 

 

 

 

For the table used in the example my schema is :

 

<table javaName="SupplierContentType" name="CMS_SUPPLIERS_CONTENT_TYPE" idMethod="native">

<column javaName="Id" name="ID" primaryKey="true" required="true"  autoIncrement="true"
 type="INTEGER"/>

            <!-- Type de contenu AICC ou SCORM -->

            <column javaName="ContentType" name="CONTENT_TYPE" required="true" size="50"
type="VARCHAR" />

            <column javaName="CourseSupplierId" name="COURSE_SUPPLIER_ID" required="true"
type="INTEGER"/>

 

            <foreign-key foreignTable="CMS_COURSE_SUPPLIERS">

                        <reference foreign="ID" local="COURSE_SUPPLIER_ID"/>

             </foreign-key>                                                  

 

</table>

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message