Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update Field definition in Spring Roo

Tags:

spring-roo

I defined a field in Roo with:

field number --fieldName firstNum --type java.lang.Integer

But I really wanted to define it with --notNull.

Can I update this in Roo, or do I have to update the generated files manually outside of the Roo console?

like image 623
Xetius Avatar asked Nov 06 '10 20:11

Xetius


1 Answers

I don't think there is 'delete' or 'change' field command in Roo but it's very simple just to delete field from your class (Roo would take care of updating all related artifacts) and then just add field again from Roo console.

You can keep Roo running when you modifying class outside of Roo - it should detect changes, or it will do it on next restart - pretty flexible.

like image 114
maximdim Avatar answered Oct 04 '22 10:10

maximdim