May 15th, 2011, 10:18 AM
Undo & modify function
1) If I made a mistake in the roo commands like the following, how do can I undo the entity creation:
com.springsource.roo.pizzashop roo> entity --class ~.domain.Topping --testAutomatically
2) If I would like to change the field properties after creation, say changing the fieldName, sizeMin fields after executing the following command, how do I do it?
~.domain.Topping roo> field string --fieldName name --notNull --sizeMin 2
May 15th, 2011, 12:30 PM
Roo aim to be a code generation/emission tool for Spring/Spring-MVC (..so on) apps. It does not meant to be a cmoplete end to end solution.
The particular problem of keeping versions of code is best dealt with version control systems.
In roo 1.1.4 one can easily do git setup and every roo command you enter results in a git commit. If you have some some thing bad you can revert back using git (I guess perhaps also using roo plugin but that would also delegate to VCS)
So just make a habit of checking every thing you need.
Your second question relates to changing annotations or parameters of annotations in POJOs. If you are in STS and you have a ROO shell running you can use tab completion in annotations over filed.
for example @Column annotation try to add a coman and a space and press Ctrl+Space and you would see options. Once you put some thing which makes sense and save it, ROO would go back and see what it needs to change in the .aj files. Also never touch any .aj files which roo generates.
hope the answer helps
Tags for this Thread