Spring Roo
  1. Spring Roo
  2. ROO-1735

Initial tests fail after reverse engineering

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 1.1.0.RELEASE
    • Fix Version/s: 1.1.1.RELEASE
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP
      Java 1.6.0_20

      Description

      I've reverse engineered a database, generated test classes for each entity (one at a time), and when I run the tests they all fail. I don't think I'm even hitting the db before it fails.

      The exceptions can be found in the Surefire-Reports directory.

      1. Script5.sql
        44 kB
        DJ Spiess

        Issue Links

          Activity

          Hide
          Alan Stewart added a comment -

          Delete your .roo-dbre file first

          Show
          Alan Stewart added a comment - Delete your .roo-dbre file first
          Hide
          not applicable added a comment -

          How do I get the columnDefinition="type" to show up in the reverse engineered aj files? Was this patch just for the integration tests or for the runtime too?

          Show
          not applicable added a comment - How do I get the columnDefinition="type" to show up in the reverse engineered aj files? Was this patch just for the integration tests or for the runtime too?
          Hide
          Alan Stewart added a comment -

          With release 1.1.2, the attribute should appear in the ITDs when you start the Roo shell providing you have a .roo-dbre file in your project root directory

          Show
          Alan Stewart added a comment - With release 1.1.2, the attribute should appear in the ITDs when you start the Roo shell providing you have a .roo-dbre file in your project root directory
          Hide
          Mohamed Riyazudeen added a comment -

          I am using 1.2.1 version of spring roo,

          Caused by: org.hibernate.HibernateException: Wrong column type for column HISTORY. Found: char, expected: varchar2(4)

          PK_Roo_Identifier.aj files generates only below column, but its not string.

          @Column(name = "HISTORY", nullable = false, length = 4)
          private String IsSmbAreaDimPK.history;

          dbre.xml file has correct column type,

          <column name="HISTORY" primaryKey="false" required="false" scale="0" size="4" type="1,CHAR"/>

          Also my ddl statement is,

          CREATE TABLE "IS_"."IS_HISTORY"
          ( "HISTORY" CHAR(1 CHAR),

          ) SEGMENT CREATION IMMEDIATE

          Could you please let me know why length got added as 4 also why it didn't add columnDefinition = “char”?

          Show
          Mohamed Riyazudeen added a comment - I am using 1.2.1 version of spring roo, Caused by: org.hibernate.HibernateException: Wrong column type for column HISTORY. Found: char, expected: varchar2(4) PK_Roo_Identifier.aj files generates only below column, but its not string. @Column(name = "HISTORY", nullable = false, length = 4) private String IsSmbAreaDimPK.history; dbre.xml file has correct column type, <column name="HISTORY" primaryKey="false" required="false" scale="0" size="4" type="1,CHAR"/> Also my ddl statement is, CREATE TABLE "IS_"."IS_HISTORY" ( "HISTORY" CHAR(1 CHAR), ) SEGMENT CREATION IMMEDIATE Could you please let me know why length got added as 4 also why it didn't add columnDefinition = “char”?
          Hide
          Mohamed Riyazudeen added a comment -

          Also please let know why the variable got created as String ?

          Show
          Mohamed Riyazudeen added a comment - Also please let know why the variable got created as String ?

            People

            • Assignee:
              Alan Stewart
              Reporter:
              DJ Spiess
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: