I've noticed that turbine is silent when an update fails via save(). But
everytime I've found that
it is because I'm not setting a member properly. Your sql looks
interesting, what is VARCHAR2 is this being mapped to a string?
Also, try to read the members out of data.getParameters() by hand, throw
them into a Criteria, and call SlaTypePeer.doUpdate(crit)
and see if that works.
For me 1.1a11 is working with sybase and mysql.
> -----Original Message-----
> From: David Ramsey [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 28, 2001 11:20 AM
> To: Turbine
> Subject: Re: Torque problem
>
>
> Well I spoke too soon. Something is definitely screwy here
> though and I
> need to track it down. Let me discuss one example of the problems I am
> seeing.
>
> After using the 1.1a10 generated DB classes I was able to do
> selects and
> but I was unable to do updates of the table. So, assuming I had a
> compatibility issue, I tossed out the 1.1a10 om generated code and
> regenerated all the om stuff from scratch with 1.1a11. On this pass
> through, with the exact same code, I am now getting valid
> data from the
> selects. I've no idea why this suddenly started working. This
> gave me a
> bit of hope but now I ran into another roadblock.
>
> At this point neither inserts nor updates seem to be working at all.
> Specifically, during updates I am very simply doing (inside a
> VelocityAction that gets data from a form):
> SlaType sla - new SlaType(); // This is my derived
> generated database
> class for this table.
> data.getParameters().setProperties(sla);
> SlaTypePeer.doUpdate(sla);
>
> The schema for this table is (Oracle 8.1.6 database):
>
> CREATE TABLE SLA_TYPE
> (
> ID INT NOT NULL,
> NAME VARCHAR2 (20),
> PROCEDURE_NAME VARCHAR2 (32)
> );
>
> ALTER TABLE SLA_TYPE
> ADD CONSTRAINT SLA_TYPE_PK
> PRIMARY KEY (ID);
>
> The ID field uses a sequencer but inserts and access to the sequencer
> are controlled via a before insert trigger so it really doesn't matter
> what I put in that field. Consequently, I disabled autoincrement
> (autoincrement="false") in the project-schema.xml file.
>
> After attempting to do the update, I get no exceptions and everything
> appears to be fine. However, when I go to SQLPLUS and check the table,
> the row in question is still not updated.
>
> To be sure that I have the right data from the form, I went ahead and
> dumped data.getParameters() to System.err and everything in the
> parameters looks as expected.
>
> After calling setProperties though, if I attempt to change the NAME
> field and the PROCEDURE_NAME field, only the NAME field shows
> as changed
> in the SlaType object (via sla.getName()) while the
> PROCEDURE_NAME still
> shows as null (via sla.getProcedureName()).
>
> Thus I am wondering if anyone has any insight into these two specific
> problems - (1) setProperties not setting one of the properties in the
> object correctly (but setting the others) and (2) the update
> not taking
> at all.
>
> Note: Connection to the database is valid and selects work.
> The user id
> connecting to the database has permission to update the table in
> question because I can do so from SQLPLUS.
>
> I appreciate any insights or suggestions as to where to look
> to get this
> going. I had hoped to use Turbine to quickly get this set of internal
> apps up for this client and show them a better way than JSPs but right
> now I've got some egg on my face.
>
> Thanks!
>
> --
> David Ramsey -- [EMAIL PROTECTED]
>
> -- There is an old Vulcan proverb: only Nixon could go to China.
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------------------
This message has been scanned for viruses with Trend Micro's Interscan VirusWall.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]