db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Shea <s...@gtsdesign.com>
Subject update difficulties
Date Wed, 29 Oct 2003 05:50:18 GMT
This is probably user error, but I'm having trouble with doUpdate(*).
I have dug through the code and searched the archives to no avail.  I'm
going to keep going in the code, but if anyone can explain this, please do!

I have used Torque to generate a schema and classes.  I do a simple
lookup:
        
        Criteria criteria = new Criteria("summary");
        criteria.addIn(TransSummaryPeer.XID, xids);
        Collection records = TransSummaryPeer.doSelect(criteria);

and then modify a record returned in the collection using Apache BeanUtils:

        PropertyUtils.setProperty(
            record, propName,
            PropertyUtils.getProperty(vo, propName));

and print out the Torque object to insure that the property
has in fact changed: it has.  Check if 'modified' is true: it is.
Attempt to save the changes:
       
        record.save("summary");

Look in the mysql log, and NOTHING HAPPENED!  Nor is an exception thrown,
unless it's being swallowed somewhere in Torque.  I am completely
baffled.  I have yet to find a path through the code that can have no
effect...

Interestingly, if I create a TransSummary object 'record' with an xid
(primary key) for which there is as yet no record in the database,
so that 'new' is true:

    record.save("summary");

works fine, storing the object into a database record.

Clues?

Thanks,

        Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message