|
wait, I didn't see what you were doing with the parameter map. Anyway,
how I got it to work is by naming the properties in the values part of
the insert statement with their domain object names. Including the one
I substitute with the selectKey. Like this: <insert id="insertMetricDocument" parameterClass="MetricDocument"> <selectKey resultClass="string" keyProperty="documentId"> select SC_METRIC_DOCUMENTS_ID.NextVal from dual </selectKey> 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> jaybytez wrote: And if I put it into the id (from selectKey) into my parameterMap like the following, it does not push the result of the selectKey query into the insert statement: |
- Re: selectKey and parameterMap issue Diran Ayandele
- Re: selectKey and parameterMap issue jaybytez
- Re: selectKey and parameterMap issue Jeff Butler
- Re: selectKey and parameterMap issue jaybytez
- Re: selectKey and parameterMap issue Jeff Butler
- Re: selectKey and parameterMap issue Diran Ayandele
- WOOOOHOOOO!!!!....that was it jaybytez
- Re: selectKey and parameterMap issue Diran Ayandele
- Re: selectKey and parameterMap issue jaybytez
- Re: selectKey and parameterMap issue Jeff Butler
