【发布时间】:2010-10-27 19:25:45
【问题描述】:
在Play getting started docs 中,他们显示了这个控制器:
public static void index() {
Post frontPost = Post.find("order by postedAt desc").first();
List<Post> olderPosts = Post.find("order by postedAt desc").from(1).fetch(10);
render(frontPost, olderPosts);
}
然后,在模板中使用 frontPost 和 oldPosts 没有任何特殊映射!
<a href="#">${frontPost.title}</a>
Play 如何保留这些名称?
【问题讨论】:
标签: playframework