camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taariq Levack <taar...@gmail.com>
Subject Re: JPA component - Persist 1 record working but how to persist many records?
Date Sun, 27 Oct 2013 11:47:28 GMT
Great, glad its solved.
I only saw Babak's comment now and didn't think of it earlier. The component will also take
a collection of entities, so no need to split, just convert. 
You now have another tool in the box though, enjoy the ride.

> On 27 Oct 2013, at 12:31, "richie.riviere@gmail.com" <richie.riviere@gmail.com>
wrote:
> 
> Thank you so much Taariq,
> 
> Your advice was exactly what I needed to give me enough information to
> resolve my issue.
> 
>   public List<ItemDocument> splitItemsRootDocuments(ItemRootDocument doc) {
>       List<ItemDocument> items = new ArrayList();
>       List<ItemDocuments> itemDocumentsList = doc.getItemDocumentsList();
>       for (ItemDocuments itemDocuments : itemDocumentsList) {
>           items.addAll(itemDocuments.getItemDocumentList());
>         }
>       return items;
>   }
> 
> 
> regards
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/JPA-component-Persist-1-record-working-but-how-to-persist-many-records-tp5742267p5742278.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message