You cannot specify resultClass on an insert-element, just remove it.

Niels

-----Original Message-----
From: Javier Leyba [mailto:[EMAIL PROTECTED] 
Sent: maandag 23 oktober 2006 15:29
To: [email protected]
Subject: selectKey problem

Hi

I want to use selectKey so I defined in my map:


-------------
<insert id="insertNotification" parameterMap="insertNotificationParam"
resultClass="java.lang.Long">
                        INSERT INTO notification (
                    notification.notification_id,
                    notification.topic_id,
                    notification.sourcetype_id,
                    notification.notificationtype_id,
                    notification.notification_category,
                    notification.notification_priority,
                    notification.notification_source,
                    notification.notification_expiration)
                VALUES (0,
                                ?,?,
                                ?,?,
                                ?,?,now());

                <selectKey type="post" resultClass="long">
                        SELECT LAST_INSERT_ID() AS value;
                </selectKey>                                    
        </insert>

------------------------


But I receive the message:

Cause: org.xml.sax.SAXParseException: Attribute "resultClass" must be
declared for element type "insert".

Any idea ?

Thanks in advance

J

Reply via email to