How to implement batch update using Spring Data Jpa? -


how implement batch update using spring data jpa? have goods entity, , diff user level there diff price,e.g.

goodsid level price   1       1     10   1       2     9   1       3     8 

when update goods want batch update these prices, below:

@query(value = "update goodsprice set price = :price goodsid=:goodsid , level=:level") void batchupdate(list<goodsprice> goodspricelist); 

but throws exception,

caused by: java.lang.illegalargumentexception: name parameter binding must not null or empty! named parameters need use @param query method parameters on java versions < 8.   

so how implement batch update using spring data jpa correctly?

i think not possible spring data jpa according docs. have @ plain jdbc, there few methods regarding batch insert/updates . there nice ebook covering topic.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -