#boolVal:CHAR#
you will find this in the developer guide.
nathan
All kidding aside we(mybatis team) cannot stress how much it helps to
read the guide. Reading means start at the begin and end at the end.
Once you have read it then use it as a reference guide. It is titled
a developer guide to help guide you though the learning process.
You have now chosen to use a parameter map over inline. When doing
this you need to use standard jdbc like parameters in your sqlmap.
values (?, ?, ?,?)
----- Receiving the following content -----From: Nathan MavesReceiver: mybatis-userTime: 2010-06-05, 03:13:21Subject: Re: Why Insert Fails when Select Succeeds with samollowse sqlmap
you can just mark your mapper parameters with the @Param("name")
nathan
No, see the section "Using Mappers" in the documentation. To quote:
"You can pass multiple parameters to a mapper method. If you do, they
will be named by their position in the parameter list by default, for
example: #{1}, #{2} etc. If you wish to change the name of the
parameters (multiple only), then you can use the @Param(锟斤拷paramName锟斤拷)
annotation on the parameter."
To the uninitiated, an example would be helpful at this point in the
docs. Here is one from some working code. In the mapper Java file, I
have this:
List<Site> selectVpnSites(@Param("aCustId") String aCustId,
@Param("aServId") String aServId);
and in the XML file, the corresponding SQL statement is declared like this:
<select id="selectVpnSites" parameterType="map" resultMap="siteMap">
...
where
cust_id = #{aCustId}
...
</select>
In short, if your mapper Java method passes multiple parameters, then
the parameterType in your XML will always be map (for java.util.Map).
--
Guy Rouillier