Marco,

this is expected behaviour, indeed. To be able to delete an object instance, you have 
to load the object in the very same transaction. Iow, please query 
the object again before deleting it if you really cannot change your business delegate 
to handle transactions in a different way.

I know that you are going to be bothered about the performance hit introduced by this 
second query, but maybe you are in a position to use a performance 
cache for your objects, and hence reduce the impact of this penalty.

Regards
Werner

--Original Message Text---
From: marco mistroni
Date: Sat, 31 Jan 2004 19:39:54 -0000

hi all, 
       i am using Castor JDO (version 0.9.5.2) and i have written a class (named 
CastorEntry) 
which implements the interface Persistent and TimeStampable. 
 
as part of my junit test, i am creating an object, then i am querying the database to 
see if the# 
object is there, and if it is there i delete it. 
 
the three operations are done in different transaction (because i am doing thru 
different operations in a BusinessDelegate), 
 
so, i have no problem in creating, no problem querying but when i try to delete the 
object found from the query i get this 
exception  
 
org.exolab.castor.jdo.ObjectNotPersistentException: The object of type com.myapp
.castor.CastorEntry is not persistent -- it was not queried or created within th
is transaction 
 
the table entries (associated with the object CastorEntry) has no timestamp column.. i 
tried to add a colum called timestamp, but 
since i am using mysql there is no 'long' type, so only choice was to add a colum of 
type timestamp.. 
but when i define the  mapping, the long to timestamp is not accepted.. 
 
can anyone help me in solving my problem? 
 
with best regards 
    marco 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to