You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Pecelis, Sergio" <Pe...@Toepfer.com> on 2006/10/10 18:26:42 UTC

updates with complex property

I'm new at iBatis.

I do not know how to update a table with an object that has another
object as property.

 

For example:

 

<update id="updateObj1" parameterClass="Obj1">

    UPDATE DB."TBL" SET

    ID= #obj2.id#

    DESC = #obj2.desc#

    WHERE ID = #obj2.id#

</update>

 

the table would be:

TBL

      ID:INTEGER

      DESC:VARCHAR

 

The class Obj1 has the property obj2 from Obj2 class, which has this

properties: id:int and desc:String.

 

I read something about using parameterMap but I need an example. Thanks
for helping me!

 


___________________________________________
CONFIDENTIALITY NOTICE
This e-mail and any files and/or attachments transmitted with it are strictly confidential and intended solely for the use of the addressee. They may contain privileged and confidential information and, if you are not the intended recipient, you are hereby notified that any dissemination or copying and any use or disclosure of the information contained therein is strictly prohibited and may be illegal. If you are not the intended recipient, please notify mail@toepfer.com immediately and delete this message and any files and/or attachments thereto.

RE: updates with complex property

Posted by Poitras Christian <Ch...@ircm.qc.ca>.
That xml seems ok to me. And #obj2.id# is valid.
 
Are you experiencing any problems?
 
Christian
 

________________________________

From: Pecelis, Sergio [mailto:PecelisS@Toepfer.com] 
Sent: Tuesday, 10 October 2006 12:27
To: user-java@ibatis.apache.org
Subject: updates with complex property



I'm new at iBatis.

I do not know how to update a table with an object that has another
object as property.

 

For example:

 

<update id="updateObj1" parameterClass="Obj1">

    UPDATE DB."TBL" SET

    ID= #obj2.id#

    DESC = #obj2.desc#

    WHERE ID = #obj2.id#

</update>

 

the table would be:

TBL

      ID:INTEGER

      DESC:VARCHAR

 

The class Obj1 has the property obj2 from Obj2 class, which has this

properties: id:int and desc:String.

 

I read something about using parameterMap but I need an example. Thanks
for helping me!

 

___________________________________________ 

CONFIDENTIALITY NOTICE 

This e-mail and any files and/or attachments transmitted with it are
strictly confidential and intended solely for the use of the addressee.
They may contain privileged and confidential information and, if you are
not the intended recipient, you are hereby notified that any
dissemination or copying and any use or disclosure of the information
contained therein is strictly prohibited and may be illegal. If you are
not the intended recipient, please notify mail@toepfer.com immediately
and delete this message and any files and/or attachments thereto.