|
|
How to delete Roo DB managed fields ?
I generated all the artifacts using DBRE. Now I want to delete two columns in one of the tables. How should I do that ?
I pushed in those two fields and setters and getters from xx_Roo_DBManaged.aj
into the entity bean. After I deleted them out, Roo round trip to add them back.
Please help.
Thanks,
Jin
Hi Jin,
Not sure if I follow your question.... Do you just want to 1) remove the field from the domain class, and then 2) remove its corresponding columns from the table?
If you remove the member variable from the Java class itself, Roo's round-trip will notice the removal and regenerate the .aj files and other related classes accordingly. Unless I'm misunderstanding your question....
Hi, pwagener
Thanks for your reply.
I did DBRE based on the existing database tables. After that I noticed that I have to change one of the tables to remove two columns/fields. So I pushed in those two fields from the DBManaged .aj file into domain java file
and deleted them. But Roo regenerated them again in the DBManaged .aj file.
I guess my question is how to prevent Roo to add the deleted fields back since the underline table does not contain those two fields any more.
Thanks,
Jin
DBRE is incremental. If you delete columns from your table, running the database reverse engineer command again will remove the two corresponding fields from the ITD (.aj file). There is no need to to do any push-in's of fields |
|