db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian....@t-systems.com
Subject You must specify KeyDef attributes for this TableDataSet in order to create a Record for update.
Date Wed, 10 Nov 2004 17:58:46 GMT
I´ve got this error-message. The reason should be, that the TableDataSet has no primaryKey.
But I defined a combined pK in the schema.xml.
 
I can show you the following code of the table. Perphaps, you see, what I´ve done wrong
 
<table name="TREPORTCONFIG" javaName="TReportConfig">
            <column name="USERID"
                                   javaName="UserID"
                                   required="true" 
                                   type="INTEGER">
                                   primaryKey="true"
                                   </column>
            <column name="RCNAME"
                                   javaName="RcName"
                                   required="true" 
                                   type="VARCHAR">
                                   primaryKey="true"
                                   </column>
            <column name="PROJECT"
                                   javaName="Project"
                                   required="true" 
                                   type="VARCHAR"></column>
            <column name="SUBSYSTEM"
                                   javaName="Subsystem"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="RELEASE"
                                   javaName="Release"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="RCCLASS"
                                   javaName="RcClass"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="MANAGER"
                                   javaName="Manager"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="RESPONSIBLE"
                                   javaName="Responsible"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="DATETIMEFILTER"
                                   javaName="DateTimeFilter"
                                    required="false" 
                                   type="VARCHAR"></column>
            <column name="SEARCHTEXT"
                                   javaName="SearchText"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="LIST"
                                   javaName="List"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="PRIORITY"
                                   javaName="Priority"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="SEVERITY"
                                   javaName="Severity"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="STATE"
                                   javaName="state"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="SORTORDER"
                                   javaName="sort0rder"
                                   required="false" 
                                   type="VARCHAR"></column>
            <column name="ISPUBLIC"
                                   javaName="IsPublic"
                                   required="false" 
                                   type="VARCHAR"></column>
 
</table>
 
and that´s the way. I tried to delete a row:
 
Criteria crit = new Criteria();
            
            System.out.println("rcName:" +rcName);
            System.out.println("userID:" +user.getObjectID());
            crit.add(TReportConfigPeer.RCNAME, rcName);
            crit.add(TReportConfigPeer.USERID, user.getObjectID());
            
            try {
                        TReportConfigPeer.doDelete(crit);
            } catch (TorqueException e) {
                        e.printStackTrace();
            }
 
I hope, you can help me. Thanx for your answers
 
 

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