Hi !

I'm having the following error when I try to delete an object:

org.exolab.castor.jdo.ObjectNotPersistentException: The object of type com.ecomm
erce.jdo.Photo is not persistent -- it was not queried or created within this 
transaction

The code is :

        session.getDatabase().begin();
        Photo photo = photo = Photo.findById(session,frm.getId(),Database.ReadOnly);
        session.getDatabase().delete(photo);
        session.getDatabase().commit();

What's the reason for that message ? Why wouldn't my object being created and deleted
in the same transaction ?  

Thanks in advance !
Michel

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

Reply via email to