I strongly encourage Java client/server/web technologies. However, scripting languages continue to have a significant place in the market. Will Java be replaced? or will they live happily together?
Tuesday, March 24, 2009
iBATIS Parameter Maps (a.k.a my iBATIS brain f*rt)
Problem:
On a project using iBATIS, I was receiving the following stacktrace:
And this is the snippet of the parameter map that is significant:
Well, my project hardly ever used explicit parameter maps. Usually, statements used the parameterClass="" syntax. So, as you might already know, my syntax was terribly wrong. The correct syntax follows. The thing to note (at least for me) is that the order of the individual SET parameters must match the order given in the parameter map that you use.
Hmm, not sure exactly what your point is as my post was not trying to resolve "typing issues". I am *purposely* not using java.util.date in my class, in favor of Joda classes (hence the need for the typehandler and parameter map). But thanks for the comment.
3 comments:
He i resolve the same error changing the field type in my data base to timestamp and in my persistent class the parameters are date
Hmm, not sure exactly what your point is as my post was not trying to resolve "typing issues". I am *purposely* not using java.util.date in my class, in favor of Joda classes (hence the need for the typehandler and parameter map). But thanks for the comment.
Thanks! I have exactly the same problem: "my project hardly ever used explicit parameter maps".
Nice tip!
Post a Comment