ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Where did my newline go????????
Date Thu, 03 Dec 2009 18:33:38 GMT
yes, iBATIS does trim newlines from the SQL statement itself.  If you're
using $substring$ replacement style parameters, they'll get trimmed. The
solution (and a safer way to code this) is to use JDBC #parameters#.

Clinton

On Thu, Dec 3, 2009 at 11:22 AM, Ivan Bojer <ibojer@gmail.com> wrote:

> Hi folks,
>
> I am going crazy with this and I would appreciate any help or hint!
>
> Here is the sample:
>
> RadiusServersDAO serversDao = new RadiusServersDAOImpl(sqlMapper);
> RadiusServers aServer = getServerCraft()...
>
> String endline = System.getProperty("line.separator");
> String adminSecret = "aaa"; //$NON-NLS-1$
> adminSecret += endline;
>
> aServer.setAdminSecret(adminSecret);
> serversDao.updateByPrimaryKey(aServer);
>
> Once the update is done my 'admin_secret_ column contains entry which
> is trimmed of the newline. I tried the same with pure JDBC and that
> works.
>
>
> Please help!!!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Mime
View raw message