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

Not declaring entity directly in controller causes roo to delete aj file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.2.4.RELEASE
    • Fix Version/s: None
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      It seems roo cannot find the backing entity in a controller unless it's imported directly. When my IDE (in this case IntelliJ) organizes my imports, and condenses some imports using the * wildcard, some of my controllers aj files are deleted by Roo.

      This is most basic case to reproduce it:

      // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-10-13 13:53:20
      project --topLevelPackage com.springsource.roo.pizzashop
      jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
      entity jpa --class ~.domain.Topping --testAutomatically
      field string --fieldName name --notNull --sizeMin 2
      web mvc setup
      web mvc all --package ~.web
      quit
      // Spring Roo 1.2.4.RELEASE [rev 75337cf] log closed at 2013-10-13 13:58:54

      Then go into ToppingController.java and replace:
      import com.springsource.roo.pizzashop.domain.Topping;

      with:
      import com.springsource.roo.pizzashop.domain.*;

      Then you will get:
      Deleted SRC_MAIN_JAVA\com\springsource\roo\pizzashop\web\ToppingController_Roo_Controller.aj - empty

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                aolarte Andres Olarte
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: