• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

AddBatch equivalent in JPA

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, do we have addBatch functionality in JPA??
I have to call a procedure for multiple transaction Id's so instead of calling the procedure multiple times using for loop, can you please suggest me if there any functionality in JPA just like JDBC where we do addbatch()
 
Creator of Enthuware JWS+ V6
Posts: 3349
303
Android Eclipse IDE Chrome
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there isn't.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,pragati
no there isn't available function like JDBC but you can do with follow bellow link

https://stackoverflow.com/questions/50772230/how-to-do-bulk-multi-row-inserts-with-jparepository

i hope this will help to you
 
pragati dev
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in JDBC I'm doing this

here we are doing add batch I was to do the same using SimpleJDBCCall but I'll have to use forEach instead of it can you please suggest the alternative approach so that the proc will not be called only once like in above code?
 
pragati dev
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
* so that the procedure is called only once for multiple transaction Objects
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic