Dec 14th, 2011, 12:41 PM
**_Roo_Entity.aj has method called **.persist() which persist one object at a time to DB.
I want to add batch insert capability in the **_Roo_Entity.aj.
A method which takes list of object and does bulk insert. like creatAll(List<**> objects).
is it possible to do by adding new method in **._Roo_Entity.aj?
I was reading that it is not good option to edit **Roo_Entity.aj file. if then what is alternate class to add the method.
Dec 15th, 2011, 03:25 AM
These files are managed by Roo, so any changes you do will disappear.
Just add whatever code you need to the java files.
Dec 15th, 2011, 08:10 AM
Or, if you want to keep it in ITD simply add this method to
And your method will be generated.
Requires source code and recompile roo after this change.
Advantage is update generated methods which are same. So you no need to add this method to all entities.
Dec 16th, 2011, 02:34 AM
Alternatively, you can create your own aspect. Try to use the _Roo_Entity.aj as base.
Dec 16th, 2011, 03:28 AM