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

Database reverse engineering cannot handle camelcase columns in MySQL using Hibernate

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Works as Designed
    • Affects Version/s: 1.1.0.RELEASE
    • Fix Version/s: 1.1.1.RELEASE
    • Component/s: None
    • Labels:
      None
    • Environment:
      MySQL 5.1 Ubuntu 10.10

      Description

      When reverse engineering tables with camelcase columns using MySQL and Hibernate, something goes wrong, as the webapp resulting from a 'controller all' results in a mapping exception when running it.

      Steps:

      1. Create a database and add rights
      create database roobug
      grant all privileges on roobug.* to [email protected] identified by 'roobug'
      2. Create a table with a camelcase column
      create table camelcasebug(id int primary key, buggyColumn varchar(50));
      3. Startup Roo and create a project
      mkdir roobug
      cd roobug
      roo
      project --topLevelPackage com.buggy.camelcase
      4. Setup persistence
      persistence setup --database MYSQL --provider HIBERNATE --databaseName roobug --userName roobug --password roobug
      5. Reverse engineer
      database reverse engineer --package ~.domain
      6. Create controllers
      controller all --package ~.controller
      7. Exit Roo
      q
      8. Run the application in Tomcat.
      mvn tomcat:run

      The result will be an exception like this:

      org.hibernate.HibernateException: Missing column: buggy_column in roobug.camelcasebug

      When looking at the DbManaged .aj file for that table, the mapping seems correct. Perhaps Roo creates a faulty configuration somewhere?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                lievendoclo Lieven Doclo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: