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

Joined tables not created when inheritanceType is "JOINED"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Works as Designed
    • Affects Version/s: 1.2.0.M1
    • Fix Version/s: None
    • Component/s: @ ROO SHELL
    • Environment:
      osx, roo nightly build, up to 10/18/2011

      Description

      The Roo script below generates errors on the integration tests. The problem occurs when deriving entities from a common base class and having a unique column requirement. Removing either the unique constraint or the base class eliminates the errors.

      project com.foomvc
      jpa setup --provider HIBERNATE --database POSTGRES --databaseName foo --hostName localhost --userName fooadmin --password foo --transactionManager 
      entity --class ~.domain.AbstractRecord --abstract
      field boolean --fieldName statusOk --transient --comment "All issue data passes verification"
      entity --class ~.domain.Parent --testAutomatically --extends ~.domain.AbstractRecord --inheritanceType JOINED
      field string --fieldName displayName --notNull --unique --sizeMin 4
      entity --class ~.domain.Child --testAutomatically --extends ~.domain.AbstractRecord --inheritanceType JOINED
      field string --fieldName displayName --notNull --unique --sizeMin 4
      // Setup heirarchical references
      focus  --class ~.domain.Parent
      field set	--fieldName children --type ~.domain.Child	--cardinality ONE_TO_MANY	--mappedBy parent
      focus  --class ~.domain.Child
      field reference --fieldName parent	--type ~.domain.Parent	--cardinality MANY_TO_ONE
      web mvc setup
      web mvc all --package ~.web
      perform clean
      perform eclipse
      perform test

      Generates these errors on 'perform test':

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on project foomvc: There are test failures.
      [ERROR] o> 
      [ERROR] Please refer to /Users/bedge/src/roo/foo-unique/target/surefire-reports for the individual test results.
      [ERROR] -> [Help 1]
      [ERROR] o> 
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] o> 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

      The surefire reports are attached.

        Attachments

          Activity

            People

            Assignee:
            aswan Andrew Swan
            Reporter:
            bedge Bruce Edge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: