Jan 20th, 2013, 11:19 AM
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?
Jan 20th, 2013, 10:21 PM
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.
Jan 26th, 2013, 08:30 AM
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?
Jan 26th, 2013, 05:13 PM
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
Tags for this Thread