Ondra,
I agree. We are making use of this feature quite a bit in our legacy
system (old objects, old DB) in which we are currently switching to
use iBATIS. We are striving to maintain high compatibility by making
few changes to the code, sql, and schema. nullValue comes in handy a
LOT.
It seems that iBATIS 3 is moving away from the idea of a true Data
Mapper, and adopting a more ORM slant. I've seen it mentioned a few
times that the developers prefer using objects over primitives. This
seems to be a personal preference, as far as I can tell. I think
personal preference is usually a good thing when it comes to code.
Trying to be a jack-of-all trades can really dilute best practices.
However, to many people, I believe iBATIS represents a low(er) level
tool (than Hibernate, JPA, etc) that allows them to really get their
SQL mapped up to their objects without having to worry about best
practices. Sometimes, this is the best solution; especially when it
comes to legacy applications.
Developers will simply have to make a choice. Either stick with iBATIS
2, retrofit a lot of code to match the new ideals of iBATIS 3, or use
iBATIS 3 in a non-standard, arguably hacky way.
I wish we didn't have to make this choice, but sometimes that's the
price of progress. :)
Ian.
On Aug 9, 2008, at 6:08 PM, John Clash wrote:
Quite bad news for me :(
I use nullValue as a convenient brief instrument to unify both null
values
OR empty String to NULL in the database (e.g. when importing from
Excel and
some cells are empty (that yields null) and some have empty strings).
Handling it in Java or SQL code would clutter it quite much.
Can we expect some substitute for this in iBatis 3?
Ondra
Clinton Begin wrote:
I recommend not using nullValue replacement. It's confusing and
doesn't
work the way most people would expect it to, quite the opposite
actually.
It's used to map nullable columns to non-nullable class members,
like int,
long, double, boolean etc...
It will not be available in iBATIS 3.
Clinton
--
View this message in context:
http://www.nabble.com/inline-map-format%3A-empty-String-in-nullValue-tp18905940p18908933.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.