Results 1 to 4 of 4

Thread: Problems after deleting an entity

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Default Problems after deleting an entity

    Hello,

    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. #2
    Join Date
    Dec 2005
    Posts
    929

    Default

    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.
    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Jan 2013
    Posts
    2

    Default

    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?

    Thanks
    Ganesh

  4. #4
    Join Date
    Dec 2005
    Posts
    929

    Default

    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

    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •