-
Dec 14th, 2011, 12:41 PM
#1
Editing **_Roo_Entity.aj
**_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
#2
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
#3
Or, if you want to keep it in ITD simply add this method to
https://github.com/SpringSource/spri...dMetadata.java
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
#4
Alternatively, you can create your own aspect. Try to use the _Roo_Entity.aj as base.
-
Dec 16th, 2011, 03:28 AM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules