Announcement Announcement Module
No announcement yet.
Problems after deleting an entity Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems after deleting an entity


    I am having issues while deleting an entity. I created a project after cloning from existing project and it had a number of entities. I deleted some entities by deleting the source java files while keeping roo console open. It seemed Roo updated and deleted some files on the console but when I tried to build the project I am getting compile errors for the deleted entity. I have two questions :
    1) What is the correct way to delete an entity?
    2) How to remove the compile errors for the deleted entity?

  • #2
    If you delete an entity while the Roo shell is running the associated AspectJ .aj files will be deleted automatically. If you delete the entity while the shell is not running the a.j files fill be deleted the next time you run the shell. You can also delete the .aj files manually after deleting the entity if you wish.

    Note thought if your entity had references to other entities then most likely you will have compile errors in the project.


    • #3
      Thanks Alan,

      I deleted entities while keeping the Roo shell running. The Roo shell detected that I deleted the source files and it deleted and updated few .aj files as expected. But when I tried to test application by running "perform test", it is giving errors related to missing types. If I skip the tests and build the app, the build is successful and the application runs fine. Do I have to update the test classes somehow?



      • #4
        Roo doesn't delete .java files, unless they have a @RooDbManaged annotation, which is only from reverse engineering a database.

        You will need to delete the test .java files manually