ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felix thomas <reachfe...@yahoo.co.in>
Subject select Key not working giving error.
Date Thu, 12 Jul 2007 05:26:12 GMT
hi,

 I am getting the below error in iBatis 2 .
 
 this is my sqlMap statement



 <insert id="insertCustomObject"
parameterClass="com.sb.model.CustomObjectDetails">
    
    <selectKey resultClass="int" >
      
      SELECT record_id.NEXTVAL AS ID  FROM DUAL
    </selectKey>
      
    
    insert into OBJECT
(OBJECT_ID,NAME,SINGULAR_LABEL,PLURAL_LABEL,DESCRIPTION,IS_REPORTS_ALLOWED,IS_ACTIVITIES_ALLOWED,
   
IS_NOTES_ALLOWED,IS_TRACK_CHANGES,IS_DEPLOYED,IS_STANDARD,MODIFIED_BY,OBJECT_TYPE_ID)
values
(#ID#,#objectName#,#singularLabel#,#pluralLabel#,
   
#description#,#reportsAllowed#,#activitiesAllowed#,#notesAllowed#,#trackChanges#,#isDeployed#,'N',1,213)
   
     
   </insert> 


 It gives me Error saying ID element key  not
identified etc.

 My problem is that rest all columns are coming from
the class object, only for the insertion of column
OBJECT_ID i am getting the value from a sequence. 

is this possible in sqlmaps . Can anyone help.

Regards,
Felix T


		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

Mime
View raw message