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

Entity generator duplicates packages when using an abstract class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.0.RELEASE, 1.2.1.RELEASE
    • Fix Version/s: 1.2.2.RELEASE
    • Component/s: @ CORE, @ ROO SHELL
    • Labels:
    • Environment:
      Windows 7 64 bits, JVM SUN 1.6.0_24

      Description

      When generating my application from a ROO script, the generator duplicates the last package for almost all the entities. This is rather painful to correct after generation. I found 2 conditions for this bug to be triggered:

      • using an abstract class, in a package different that the main one
      • not putting any commands between "jpa setup" and "entity jpa"

      Here is an easy way to reproduce this bug:

      • open the sample multimodule.roo
      • change line "entity jpa --class ~.domain.AbstractPerson --abstract" to "entity jpa --class ~.domain.base.AbstractPerson --abstract" to relocate the entity in domain.base
      • remove the 2 enum types or comment their declaration. The script will fail for this later on but the bug will be triggered before
      • run the script
      • notice that the the Entities Owner and Vet are now in the package "domain.domain" rather than just "domain"

      I believe this is just a missing re-initialization in the core, but I can't help any further. I joined the demo script to the ticket.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stewarta Alan Stewart
              Reporter:
              dalbert David Albert
              Votes:
              0 Vote for this issue
              Watchers:
              0 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