Bugs item #9279, was opened at 2007-03-14 11:05 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=9279&group_id=2014
Category: AR-JDBC Group: 0.2.3 >Status: Closed Resolution: None Priority: 3 Submitted By: Martin Plöger (martin_ploeger) Assigned to: Nobody (None) Summary: Oracle: NameError: no method 'setLong' with arguments matching [java.lang.Long, org.jruby.RubyBigDecimal]: INSERT INTO projects (name, id) Initial Comment: A NoMethodError is raised in the method 'execute_prepared_insert(sql, id)' in jdbc_oracle.rb when trying to insert a new object into a table. The Exception happens when the driver is trying to create a new unique id and tries to set it to the preparedStatement. The id is a JRuby-BigDecimal. This can not be converted to a Java-Long. I just added a conversion to Ruby-Integer and it works. the problem is that statement: stmt.setLong(1,id) when it is replaced by: stmt.setLong(1,id.to_i) it works. I do not know, if there is any information loss by converting BigDecial to Ruby-Integer, but I do no think so. ---------------------------------------------------------------------- >Comment By: Ola Bini (olabini) Date: 2007-08-11 15:25 Message: This should be fixed in trunk now. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=9279&group_id=2014 _______________________________________________ Jruby-extras-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/jruby-extras-devel
