Hi All,
Is it possible to use both "Return Generated Keys" and Batch Requests
options in DSS 3.5.0?
For an example I have a query(addFlightQuery) which inserts a record to a
table. If I don't enable the "Return Generated Keys" options as in [1], I
can see both "_post_addflightquery" and "_post_addflightquery_batch_req"
operations. But if I enable it as in [2], it shows only the
"_post_addflightquery" operation. Is it possible to get both
"_post_addflightquery" and "_post_addflightquery_batch_req" operations
while enabling the "Return Generated Keys" options
[1]
<data enableBatchRequests="true" name="BatchInsertSample">
<config enableOData="false" id="json">
<property name="driverClassName">com.mysql.jdbc.Driver</property>
<property name="url">jdbc:mysql://localhost:3306/json_array</property>
<property name="username">root</property>
<property name="password">root</property>
<property name="minIdle">1</property>
<property name="maxActive">10</property>
<property name="validationQuery">SELECT 1</property>
</config>
<query id="addFlightQuery" useConfig="json">
<sql>insert into flights (flight_no, number_of_cases, created_by,
description, trips) values
(:flight_no,:number_of_cases,:created_by,:description,:trips)</sql>
<param name="flight_no" ordinal="1" sqlType="BIGINT"/>
<param name="number_of_cases" ordinal="2" sqlType="BIGINT"/>
<param name="created_by" ordinal="3" sqlType="STRING"/>
<param name="description" ordinal="4" sqlType="STRING"/>
<param name="trips" ordinal="5" sqlType="BIGINT"/>
</query>
<resource method="POST" path="/addFlightQuery">
<call-query href="addFlightQuery">
<with-param name="flight_no" query-param="flight_no"/>
<with-param name="number_of_cases" query-param="number_of_cases"/>
<with-param name="created_by" query-param="created_by"/>
<with-param name="description" query-param="description"/>
<with-param name="trips" query-param="trips"/>
</call-query>
</resource>
</data>
[2]
<data enableBatchRequests="true" name="BatchInsertSample">
<config id="json" enableOData="false">
<property name="driverClassName">com.mysql.jdbc.Driver</property>
<property name="url">jdbc:mysql://localhost:3306/json_array</property>
<property name="username">root</property>
<property name="password">root</property>
<property name="minIdle">1</property>
<property name="maxActive">10</property>
<property name="validationQuery">SELECT 1</property>
</config>
<query id="addFlightQuery" r*eturnGeneratedKeys="true" *
useConfig="json">
<sql>insert into flights (flight_no, number_of_cases, created_by,
description, trips) values
(:flight_no,:number_of_cases,:created_by,:description,:trips)</sql>
* <result element="GeneratedKeys" rowName="Entry"
useColumnNumbers="true">*
* <element column="1" name="ID" xsdType="integer"/>*
* </result>*
<param name="flight_no" ordinal="1" sqlType="BIGINT"/>
<param name="number_of_cases" ordinal="2" sqlType="BIGINT"/>
<param name="created_by" ordinal="3" sqlType="STRING"/>
<param name="description" ordinal="4" sqlType="STRING"/>
<param name="trips" ordinal="5" sqlType="BIGINT"/>
</query>
<resource method="POST" path="/addFlightQuery">
<call-query href="addFlightQuery">
<with-param name="flight_no" query-param="flight_no"/>
<with-param name="number_of_cases" query-param="number_of_cases"/>
<with-param name="created_by" query-param="created_by"/>
<with-param name="description" query-param="description"/>
<with-param name="trips" query-param="trips"/>
</call-query>
</resource>
</data>
Regards,
Samith
--
Best Regards
Samith Dassanayake
Senior Software Engineer | Cloud TG
WSO2, Inc. | http://wso2.com
lean. enterprise. middleware
Mobile : +947 76207351
Blog : buddycode.blogspot.com
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev