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 <ibo...@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-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>
>

Reply via email to