Announcement Announcement Module
No announcement yet.
Editing **_Roo_Entity.aj Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    These files are managed by Roo, so any changes you do will disappear.

    Just add whatever code you need to the java files.


    • #3
      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.


      • #4
        Alternatively, you can create your own aspect. Try to use the _Roo_Entity.aj as base.


        • #5
          Here you are a thread about the same thing