开发者

Creating a List<> Member with Spring Roo

The Spring Roo command field set creates a Set<> member.

field set --fie开发者_C百科ldName --type

How does one go about creating a List<> instead?


From the latest relese(1.2.4) onwards roo supports lists.

field list --fieldname -- type


What is your persistence implementation? Are you using JPA or JDO? Hibernate (JPA provider) will technically "support" lists but makes no guarantee as to the order returned (maintaining order in a database doesn't come for free) and so you may as well use a Set.

It's possible that Roo doesn't bother with lists under that reasoning.


I just change it in the java code from set to list. If the roo console is open, It updates automatically .aj files. It just works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜