-
Jul 19th, 2010, 08:20 AM
#1
How to remove a field? Difference between field reference and field other?
Let's say you have created a field on an entity and now you want to remove it. Which roo command you should use?
Another question is (sorry for 2 QNs in one thread) what is the difference between those two commands?:
field reference --fieldName car --type com.demo.Car
field other--fieldName car --type com.demo.Car
Thanks for the answers.
-
Jul 20th, 2010, 07:36 PM
#2
Remove a field by editing the .java file and deleting it. Roo will respond automatically. "field other" is used to add a standard private field into a class. "field reference" is used to add a 'many' side of a M:1 relationship, so it has the JPA annotations added to the field.
roo> help field other
Keyword: field other
Description: Inserts a private field into the specified file
roo> help field reference
Keyword: field reference
Description: Adds a private reference field to an existing Java source file (eg the 'many' side of a many-to-one)
-
Jul 21st, 2010, 12:15 AM
#3
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