Hi, I'm trying to do an insert with a selectKey
(oracle database) statement like the next one, but it
doesn´t assign the sequence value to the especified
field. Any wrong in the next xml fragment?
 
<insert id="insertDocumento"
parameterClass="Documento">
                    <selectKey resultClass="int"
keyProperty="ID_DOCUMENTO" > 
                   SELECT DOCUMENTOS_SEQ.nextval AS
ID_DOCUMENTO FROM DUAL
            </selectKey>
                        insert into gco_documentos
                                (ID_DOCUMENTO, 
                                 ID_TEMPORADA, 
                                 FECHA, 
                                 DESCRIPCION, 
                                 FICHERO, 
                                 TIPO_DOC)
                        values
                                (#ID_DOCUMENTO#, 
                                 #ID_TEMPORADA#, 
                                 #FECHA#, 
                                 #DESCRIPCION#, 
                                 #FICHERO#, 
                                 #TIPO_DOC# )
                </insert>

Thanks in advance


                
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es

Reply via email to