Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2415

DBRE not include 'schema' attribute on 'Table' annotation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.1.4.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: PERSISTENCE
    • Environment:
      Linux Ubuntu 10.10, Apache Maven 3.0.2, Java 1.6.0_23, PostgreSQL 8.2.9, Commit 79bf6a92542ec54860baad787b62340cf7e3ddee

      Description

      Next command:

      database reverse engineer --schema myschema --package ~.domain
      

      Generate entity classes with @Table without schema definition:

      MyEntity_Roo_Entity.aj
      ...
      declare @type: Sentencias: @Table(name = "MyEntity");
      ...    
      

      Application can't find tables because are placed in a non default schema.
      Schema attribute is required:

      MyEntity_Roo_Entity.aj
      ...
      declare @type: Sentencias: @Table(schema="myschema", name = "MyEntity");
      ...    
      

      By default, this is the desired behavior.

      However, in some cases it's preferable not define the schema attribute at Table annotation and set a schema search path in the database. In this case, the application is not schema dependent.

      Then, i propose a new database reverse engineer option:

      --includeSchemaReference: Include a reference to database schema on Entitys (boolean, optional, and true by default).

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            mmartinez Mario Martínez Sánchez - gvNIX - DISID
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified