ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mkhitaryan, Aram" <Aram.Mkhitar...@lycos-europe.com>
Subject RE: Update query
Date Thu, 24 Aug 2006 07:36:46 GMT
Check one more time your classes for public getters and setters.

Also change primitive types to their Object wrappers (int to Integer, double to Double and
so on).


This should help!

There is nothing problematic. It is so simple.






From: Andreas Prudzilko [mailto:aprudzilko@digitalchocolate.com] 
Sent: Thursday, August 24, 2006 12:26 PM
To: user-java@ibatis.apache.org
Subject: Update query




I was wondering why my track_id is set to 0 after an update statement. The #track.id# syntax
worked fine for insert statements, my Track object is also set properly with a valid ID.


Here how it looks like:


            <update id="update" parameterClass="com.sumea.timemachine.model.SumeaProject">

                        UPDATE project

                        SET name = #name#,

                        startdate = #startDate#,

                        enddate = #endDate#,

                        color = #color#,

                        track_id = #track.id#

                        WHERE project_id = #id#



I wonder what I’m doing wrong.


- Andreas




View raw message