It would happens if you map a table to a class and its extend class. Is it
your case? If it is, you should make sure it doesn't happen and change your
design.
Thomas
-----Original Message-----
>From: Andreas Demlehner [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 20, 2001 2:50 AM
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] Problem with db.remove()
>
>When I try to delete an object from my database using the code:
>
>...
> db.begin();
> User myuser = (User)db.load(User.class,userID);
>
> db.remove(myuser);
> db.commit();
> db.close();
>...
>
>the object is actually deleted from the database, but I get the Exception:
>
>org.exolab.castor.jdo.PersistenceException: Object to be deleted does not
>exist! 1 at
>org.exolab.castor.jdo.engine.SQLEngine.delete(SQLEngine.java:918) at
>org.exolab.castor.jdo.engine.SQLEngine.delete(SQLEngine.java:925) at
>org.exolab.castor.persist.ClassMolder.delete(ClassMolder.java:2236) at
>org.exolab.castor.persist.LockEngine.delete(LockEngine.java:529) at
>org.exolab.castor.persist.TransactionContext.prepare(TransactionContext.jav
a
>:1191) at
>org.exolab.castor.jdo.engine.DatabaseImpl.commit(DatabaseImpl.java:498)
>
>I am using castor 0.9.3. The DB is mysql.
>
>-----------------------------------------------------------
>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