Announcement Announcement Module
No announcement yet.
Customizing Entities Generated by DBRE Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customizing Entities Generated by DBRE

    I'm looking for an easy way to customize the entities that the database reverse engineering (DBRE) add-on for Spring Roo generates.

    If, for example, I want all my entities to implement Serializable, or to have the default annotation @RooDbManaged(automaticallyDelete = false) instead of true, I'd like to be able to define that prior to running DBRE (instead of adding/editing manually afterwards, which just seems to run contrary to the Roo way of doing things).

    Any suggestions are appreciated.

  • #2
    Well as far as I know this is not possible, but you can modify the [YourOwnClass]_Roo_*.aj ITD declarations. In STS's Package Explorer view unhide those ITDs and then right-click over and then "Refactor > Push-in ... " then OK and all the ITDs will be placed in your Entity, then you can modify it as you like.

    Note that doing that is not what the Spring Roo/DBRE was concieved for, but it should work fine.