-
Jan 20th, 2013, 11:19 AM
#1
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?
-
Jan 20th, 2013, 10:21 PM
#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.
Alan
-
Jan 26th, 2013, 08:30 AM
#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?
Thanks
Ganesh
-
Jan 26th, 2013, 05:13 PM
#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
Alan
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
-
Forum Rules