Hi Ivan,
> I use Torque 3.0 with Postgres and have following problem:
3.0 is a little bit out-dated, isn't it? ;-)
> After deleting some concrete object with usual
> ClassNamePeer.doDelete(objectToDelete), I can still see it in database when
> querying for that objects information with plain JDBC.
That should not happen, as long as you don't use
Connection con = Transaction.begin("myDB");
ClassNamePeer.doDelete(objectToDelete, con);
and did not commit the transaction via
Transaction.commit(con);
> I suppose that Torque has some delayed deletion mechanism
No, Torque has not such a mechanism - the record should be deleted
immediately as long as no other process holds a lock on the record or table.
Checking for locks on the table could be a good idea. We were facing
a similiar behaviour with Oracle some time ago:
While using the doDelete() and doUpdate() methods, sometimes it took long time
until Oracle told the client that it has detected a lock. Perhaps you are
facing a similiar situation with Postgres?
cheers
Michael
Ivan Ivankovic schrieb:
Hi,
I worked with Torque only for past 2 weeks, and I found it very useful.
I use Torque 3.0 with Postgres and have following problem:
After deleting some concrete object with usual
ClassNamePeer.doDelete(objectToDelete), I can still see it in database when
querying for that objects information with plain JDBC.
When I use any of Torque query methods, via Criteria or retrieveByPK(key),
object seems to be erased, but some parts of application I am working on use
JDBC so I can't rewrite all code to use Torque
BasePeer.executeQuery(queryString). Database data for this object can also
be seen from Squirrel JDBC browser which of course uses plain JDBC.
I suppose that Torque has some delayed deletion mechanism and I need some
way to make him do the actual deletion completely from database. Is there
some kind of "flush" to achieve this?
Regards,
Ivanko
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.0.409 / Virus Database: 268.14.6/535 - Release Date: 15.11.2006
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]