spring integration - How to insert multiple rows updating-outbound-gateway? -


i using <updating-outbound-gateway> insert record using nativequery. how can pass list multiple records can inserted in db?

<int-jpa:updating-outbound-gateway native-query="insert partner_response_details(partner_id,bank_reference_number,request_string,response_string,response_date) values (:partnerid,:bankreferencenumber,:requeststring,:responsestring,:responsedate)"  entity-manager="entitymanager">   <int-jpa:transactional />   <int-jpa:parameter name="partnerid" 			expression="payload['partnerid']" />   <int-jpa:parameter name="bankreferencenumber" 	expression="payload['bankreferencenumber']" />   <int-jpa:parameter name="requeststring"  		expression="payload['requeststring']" />   <int-jpa:parameter name="responsestring" 		expression="payload['responsestring']" />   <int-jpa:parameter name="transactionstatus" 	expression="payload['transactionstatus']" />   <int-jpa:parameter name="responsedate" 			expression="payload['responsedate']" />  </int-jpa:updating-outbound-gateway>

since isn't possible jpa native query perform bulk update, <int-jpa:updating-outbound-gateway> doesn't provide functionality.

it possible regular entitymanager.persist() though.

you task can fix <splitter> in front of <int-jpa:updating-outbound-gateway>. if in single thread, there won't performed db call until tx commit after records.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -