Q1> In spring-roo how can I define a field that I want to appear on the page but doesn't get persisted in the DB.
For e.g: If I have a confirm-password field开发者_开发知识库 that I want to appear on the page so that I can validation the password but don't want to persist it.
Q2> Is there a way to define a password field directly form roo shell.
Q1: Mark the field with @Transient. This is really a JPA question more than a Roo question.
Q2: You can define the field in the roo shell, but I don't believe there is a transient option in the Roo shell. You have to Mark the field with the @Transient option after you generate it with the roo shell.
BTW Roo rocks.
精彩评论