Closed GoogleCodeExporter closed 9 years ago
I put together an implementation for this. This seems to work well with my
data that is using non-standard data types. I tried a couple variations, but
the alternatives either were not as type-safe or required adding a "default"
value to the SQLType enum, which could have side-effects elsewhere.
This simply adds support for @OverrideSQLType(jlibs.jdbc.SQLType.XXXX), and
when present, wraps values in a type (i.e. TypedValue) that setParams later
detects and unwraps.
No changes were needed to the existing custom SQL methods, but if a user needs
to, they can use the same wrapper to force the typing on individual arguments:
EMPLOYEES.update("set age=? where custom_typed_name=?",
25, new TypedValue(SQLType.OTHER, "kumar"));
Original comment by eire...@gmail.com
on 4 Jun 2011 at 4:24
Attachments:
FIXED@r1526
set nativeType=true on Column Annotation
Original comment by santhosh.tekuri@gmail.com
on 10 Jun 2011 at 4:31
Original issue reported on code.google.com by
eire...@gmail.com
on 2 Jun 2011 at 4:08