The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use ActiveObjects to perform insert and update operations in batches?

lamella
Contributor
May 11, 2023

As the title shows, I currently need to insert or update more than 10,000 pieces of data at one time, and the current RawEntity entity class only provides the function of inserting or updating a single piece of data. How can I implement batch insert or update data operations?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Robert Lichman {Appfire}
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2023

To batch insert you can use create for list available probably in AO version >=3.x

<T extends RawEntity<K>, K> void create(Class<T> var1, List<Map<String, Object>> var2); 

I would like to join the question about batch update. Is there any option to save in batch instead of using save method from RawEntity class?

lamella
Contributor
July 18, 2023

Hi @Robert Lichman {Appfire} 

    I used the same solution as you for batch insertion. In the previous plug-in development work, my ao version was only 1.2.x, which prevented me from discovering this batch saving method.
    Regarding batch update, I don't have any good ideas to implement it. Maybe we can re-implement the underlying logic of ao and add a batch update method?
    If you have any good ideas, please feel free to contact me at lamella@skyln.cn
Sincere blessing

:-)