开发者

How to define a field in spring-roo which appears on the page but doesn't get persisted

开发者 https://www.devze.com 2022-12-25 21:22 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消