ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diran Ayandele <Adediran.Ayand...@Sun.COM>
Subject Re: Unary conditional problem
Date Thu, 23 Mar 2006 23:41:49 GMT
yeah - I was afraid that might be the case.  I couldn't find anything in 
the documentation though to say that it wasn't possible though.

Diran

Daniel Pitts wrote:

>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: Adediran.Ayandele@Sun.COM [mailto:Adediran.Ayandele@Sun.COM] 
>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
>  
>

Mime
View raw message