#1123 ✓resolved
Alex Coles

do_jdbc #execute_reader/non_query blow up when passed parameters of a subclassed, supported type

Reported by Alex Coles | November 13th, 2009 @ 06:11 PM | in 0.10.2

do_jdbc's type inference for parameters does not correctly handle subclasses of the supported types. Instead it will inelegantly display a NPE.

To reproduce, apply the following patch to data_objects/lib/data_objects/spec/typecast/string_spec.rb:

An example of where this might cause an issue for a user:
- loading information from CSV - iterating over a row, a row's value is of type CSV::Cell, a subclass of String. DataMapper and DataObjects (MRI) will handle parameter correctly and pass to the DB as String. DataObjects (JRuby) will throw NPE.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.