SQLTemplate - multiple statements

From: Dave Merrin (dmerri..pasystems.co.uk)
Date: Mon Mar 03 2008 - 07:30:38 EST

  • Next message: Andrus Adamchik: "Re: SQLTemplate - multiple statements"

    Hi,

    is it possible to have multiple sql statments in the one SQLTemplate?

    e.g.

        <query name="PurgeItemByRootNodeId" factory="org.apache.cayenne.map.SQLTemplateBuilder" root="data-map" root-name="Untitled">
            <property name="cayenne.GenericSelectQuery.fetchingDataRows" value="true"/>
            <sql>
                <![CDATA[
                DELETE item
                FROM item, item_node
                WHERE item.item_id = item_node.item_id
                AND item_node.item_node_id = $root_node_id;
                ]]>
            </sql>
            <sql>
                <![CDATA[
                DELETE
                FROM item_node
                WHERE item_node.item_node_id = $root_node_id;
                ]]>
            </sql>
        </query>

    Cheers,

    Dave



    This archive was generated by hypermail 2.0.0 : Mon Mar 03 2008 - 07:33:04 EST