Announcement Announcement Module
No announcement yet.
Spring Roo 1.1.3.RELEASE DBRE Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Roo 1.1.3.RELEASE DBRE

    Hi everyone.

    I'm using Roo's DBRE addon with a MsSql db. I've changed the hibernate ddl to validate in order to check the db - java model hibernate mapping that Roo produce.

    For example, from my original mssql schema, I have changed tinyint data types to smallint, decimal to numeric and so on.. in this way I can use the Aspects generated by Roo and avoid to modify the mapping by hand.

    Then when I make changes to my mssql db I re-run the command:

    database reverse engineer --schema dbo --package ~.domain --includeTables "ext_verbale_MT*". So the generated model match the changes to the db.

    But everytime I run this command Roo scan ALL the generated view in order to update them, also if the change involves only one class of the model! This happen for every modify i made in one model. All the other are scanned and updated.

    The problem is that I have about 20 mapped tables, and it take a very long time on every save..

    Is this a problem of Roo .. or I mistake something?

    Thank you for any answer!

  • #2
    The --includeTables options is meant to only reverse engineer the tables specified. Roo will delete all other entities that are associated with tables you don't specify. Drop the --includeTables option altogether when you run the command and only those entities that have had their associated tables updated by you in the db will be modified.


    • #3
      Thank you for your reply!

      But.. for example.. I have added the version field in one table in the db and then updated the annotation in the respective model:

      @RooEntity(versionField = "VERSION", table = "ext_verbale_MT")

      When I save this model Roo start his job:

      Updated SRC_MAIN_WEBAPP/WEB-INF/views/extverbale.......
      Updated SRC_MAIN_WEBAPP/WEB-INF/views/extverbale.......
      Updated SRC_MAIN_WEBAPP/WEB-INF/views/extverbale.......
      for all the views in the project, not only for the saved one!!!!

      And I think Roo should not edit everytime not interested view!

      I mistake something?


      • #4
        There is no need to update the RooEntity annotation to add version if your table has the column. The only stipulation is that the column is called "version" and can be case sensitive for some databases.


        • #5
          Thank you for the answer..

          Ok.. it may be a wrong example..

          For simplify things:

          I insert a field
          private String test;
          in my entity, then after saving Roo try to update all the managed view, also of entity not related!