Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.4.12
-
None
-
None
-
jdk1.8.0_121, groovy 2.4.12, oracle ojdbc6 11.2.0.2.0
Description
I'm trying to insert a new row with the following code:
def result = sqlInstance.executeInsert( [ externalId: note.externalId, user : note.username, notes : note.note ], 'INSERT INTO notes VALUES (notes_id_seq.NEXTVAL, :externalId, :user, sysdate, :notes)', ['ID', 'DATE_TIME'] ).first()
The insert works fine following the fix to GROOVY-8174. However, when SqlGroovyMethods.toRowResult() tries to read the ID and DATE_TIME columns back via the rs.getObject() it fails on the DATE_TIME column with a "java.sql.SQLException: Invalid column type". While debugging if I replace the getObject() call with a rs.getString() or a rs.getDate() the value is successfully retrieved.