9

I am able to POST (insert) one entity at a time. I want to POST a collection of entities at one api call.

CrudRepository has

<S extends T> Iterable<S> save(Iterable<S> entities);

How to call above method from Spring Data REST? Already tried posting multiple entities in the form of array, that didn't work.

Does providing batch insert feature violates HATEOAS priniciple? If no, does Spring Data REST provide any default way of doing this.

charybr
  • 1,888
  • 24
  • 29
  • 4
    Check this JIRA - https://jira.spring.io/browse/DATAREST-334 and vote/comment – Stackee007 Oct 27 '14 at 19:18
  • Hey any update on this? I can see the above method being called while I'm priming the database but I can't see how it's exposed via REST? – Mark Gargan Mar 25 '16 at 10:55
  • Possible duplicate of [how post a list to Spring Data Rest](http://stackoverflow.com/questions/31374689/how-post-a-list-to-spring-data-rest) – Jens Schauder May 04 '17 at 09:06

0 Answers0