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.
精彩评论