Results 1 to 5 of 5

Thread: Editing **_Roo_Entity.aj

  1. #1

    Default 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. #2
    Join Date
    May 2006
    Location
    Madrid
    Posts
    383

    Default

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

    Just add whatever code you need to the java files.

  3. #3

    Default

    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.

  4. #4
    Join Date
    May 2006
    Location
    Madrid
    Posts
    383

    Default

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

  5. #5
    Join Date
    Apr 2011
    Posts
    20

    Default

    Here you are a thread about the same thing http://forum.springsource.org/showth...ith-spring-roo
    Óscar Rovira Casanova
    orovira@disid.com
    Disid Technologies S.L.
    Software Engineer
    http://www.disid.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •