I did not receive any response to my mail. I really need to use < Cache-type type="NONE" , > but I am still having the following problem.
thanks in advance, Emre -----Original Message----- From: Emre Tuvay [mailto:[EMAIL PROTECTED]] Sent: December 05, 2002 2:44 PM To: [EMAIL PROTECTED] Subject: [castor-dev] TimeStamp Mismatched !.. during update When I use (cache type ="NONE") in my class during update I am getting "org.exolab.castor.jdo.ObjectModifiedException: Timestamp mismatched" exception. As I went through the mails in the mailing list I have noticed that this could be something to do with dirty checking and I ignored them in the mapping file. But this still did not help. The following is the code fragment : .store method simply calls .update >>> code start executionContext.getJDOPersistenceFactory().begin(); jdoUsertoUpdate = (JdoUser) executionContext.getJDOPersistenceFactory().fetch (Constants.jdoUserObjName, userId); executionContext.getJDOPersistenceFactory().commit(); if (null == jdoUsertoUpdate) { resultData.createFailureDocument("NotFound"); resultData.addFailureMessage(Constants.ACT_PARAM_USERID + "=" + jdoUserCreated.getId()); } else { System.out.println("UserFound"); if (jdoUserCreated.getLastInfranetUpdDate() > jdoUsertoUpdate.getLastInfranetUpdDate()) { jdoUsertoUpdate.setLastInfranetUpdDate(jdoUserCreated.getLastInfranetUpdDate ()); } else if (jdoUserCreated.getLastVantiveUpdDate() > jdoUsertoUpdate.getLastVantiveUpdDate()) { jdoUsertoUpdate.setLastVantiveUpdDate(jdoUserCreated.getLastVantiveUpdDate() ); } jdoUsertoUpdate.setLastUpdDate(TimestampHandler.getTimeStampValueOfCurrentTi me()); executionContext.getJDOPersistenceFactory().begin(); executionContext.getJDOPersistenceFactory().store(jdoUsertoUpdate, false); executionContext.getJDOPersistenceFactory().commit(); >>> code end MAPPING FILE: <class name="com.wanadoo.crmt.data.JdoUser" identity="id"> <description>User</description> <map-to table="USER_T" xml="user" /> <cache-type type="none"/> <field name="id" type="string" > <sql name="id" type="varchar" /> <bind-xml name="id" node="attribute"/> </field> <field name="lastInfranetUpdDate" type="long" > <sql name="lastInfranetUpdDate" type="integer" dirty="ignore"/> <bind-xml name="lastInfranetUpdate" node="element"/> </field> <field name="creationDate" type="long" > <sql name="creationDate" type="integer" dirty="ignore"/> <bind-xml name="creationDate" node="element" /> </field> <field name="lastUpdDate" type="long" > <sql name="lastUpdDate" type="integer" dirty="ignore"/> <bind-xml name="lastUpdDate" node="element" /> </field> <field name="csrlogin" type="string" > <sql name="csrlogin" type="varchar" /> <bind-xml name="csrlogin" node="element"/> </field> <field name="lastVantiveUpdDate" type="long" > <sql name="lastVantiveUpdDate" type="integer" dirty="ignore" /> <bind-xml name="lastVantiveUpdate" node="element"/> </field> <field name="lastSymposiumUpdDate" type="long" > <sql name="lastSymposiumUpdDate" type="integer" dirty="ignore" /> <bind-xml name="lastSymposiumUpdDate" node="element"/> </field> <field name="lastBOUpdDate" type="long" > <sql name="lastBOUpdDate" type="integer" dirty="ignore" /> <bind-xml name="lastBOUpdDate" node="element"/> </field> <!-- mapping to profile --> <field name="JdoProfile" type="com.wanadoo.crmt.data.JdoProfile" collection="vector"> <sql name="profileid" many-table="USER_PROFILE_T" many-key="userid" /> <bind-xml name="JdoProfile" node="element"/> </field> <!-- mapping to right --> <field name="JdoRight" type="com.wanadoo.crmt.data.JdoRight" collection="vector"> <sql name="rightid" many-table="USER_RIGHT_T" many-key="userid" /> <bind-xml name="JdoRight" node="element"/> </field> </class> thanks for any help in this, Emre ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
