Demo Site

Wednesday, May 12, 2010

Ibatis, Oracle and SelectKey

Another useless waste of 30 minutes, apparently if you're having problems getting Ibatis's selectkey statement to work, in order to get (and return) a generated key, it will fail with something like

com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/x/ods/dao/ibatis/sqlmaps/Entity.xml.
--- The error occurred while applying a parameter map.
--- Check the insertEntity-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into
("ODS"."ENTITY_SRC"."ENT_SRC_ID")

the answer? explicitly add the type attribute and set it to "pre". ugh-

3 comments:

Anonymous said...

I absolutely adore reading your blog posts, the variety of writing is smashing.This blog as usual was educational, I have had to bookmark your site and subscribe to your feed in ifeed. Your theme looks lovely.Thanks for sharing.
Regards
iso 9000

Derlierprossy said...

This is genuinely a municipality stem ma, that you someone updated us with all of squeamish assemblage that can be proper operable for futurity surround.


computer store

Derlierprossy said...

I perfectly adore representation your diary posts, the variety of activity is breakage.This journal as familiar was educational, I mortal had to bookmark your tract and agree to your supply in ifeed. Your thought looks lovely.Thanks for sharing.



Computer Parts Store

Labels

Labels

Labels