Null Value Replacement in Mybatis

1,776 views
Skip to first unread message

Kai Tea

unread,
Jul 12, 2016, 3:37:33 PM7/12/16
to mybatis-user
Hi,


We're in the process of converting ibatis mapping to mbatis mapping.

However, we noticed ibatis has support for nullValueReplacement

But according to mbatis documentation: http://www.mybatis.org/mybatis-3/sqlmap-xml.html

We don't see equivalent support for null value replacements with mbatis.

Does mbatis still support this or is there another way to acheive the same thing?


Thank you

Guy Rouillier

unread,
Jul 12, 2016, 6:19:05 PM7/12/16
to mybatis-user
 
But this seems like a roundabout solution.  I've always just used the appropriate SQL to address the issue.  For example, with Oracle, you can use NVL(column_name, default_value).  Most DBMSs have something similar.
 
--
Guy Rouillier
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Virus-free. www.avast.com

Kai Tea

unread,
Jul 13, 2016, 4:38:23 PM7/13/16
to mybatis-user, guy.ro...@gmail.com
Thanks, going with the SQL route that makes more sense.
Reply all
Reply to author
Forward
0 new messages