It looks to me like the selectKey isn't allowed to be dynamically used. You might have to make two separate cases, and compare documentId in java code.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 23, 2006 3:23 PM To: ibatis user list Subject: Unary conditional problem Hey Guys! Is there some simple reason I get this error: Caused by: org.xml.sax.SAXParseException: The content of element type "isEmpty" must match "(include|iterate|isParameterPresent|isNotParameterPresent|isEmpty|isNot Empty|isNotNull| isNull|isNotEqual|isEqual|isGreaterThan|isGreaterEqual|isLessThan|isLess Equal|isProperty Available|isNotPropertyAvailable)". Out of this sql: <insert id="insertMetricDocument" parameterClass="MetricDocument"> <isEmpty property="documentId"> <selectKey resultClass="string" keyProperty="documentId"> select SC_METRIC_DOCUMENTS_ID.NextVal from dual </selectKey> </isEmpty> insert into SC_METRIC_DOCUMENTS ( METRIC_ID, DOCUMENT_ID, VERSION, DOCUMENT_NAME, DESCRIPTION, FILE_EXTENSION, DOCUMENT, UPDATE_DATE, UPDATED_BY) values ( #metricId#, #documentId:NUMERIC#, #version#, #documentName:VARCHAR#, #description:VARCHAR#, #fileExtension:VARCHAR#, #document#, sysdate, #updatedBy.employeeNumber# ) </insert> Thanks! Diran
