Playframework 重头戏2.6 Ebens关系错误

Playframework 重头戏2.6 Ebens关系错误,playframework,one-to-many,ebean,many-to-one,playframework-2.6,Playframework,One To Many,Ebean,Many To One,Playframework 2.6,这在Play 2.5中运行良好,但在迁移到Play 2.6后,将返回空值。 但是,我可以使用post.Privacy\u Level\u t.getDes()访问Privacy\u Level值 尝试访问层次结构行下一步的值会返回错误 我查阅了《游戏迁移指南》,但找不到与此相关的任何内容 问题 更新 这就是我提到的问题的功能 post.privacy_level_t.table_status.getDes() private boolean getPostsDetail(List post\

这在Play 2.5中运行良好,但在迁移到Play 2.6后,将返回空值。 但是,我可以使用
post.Privacy\u Level\u t.getDes()访问
Privacy\u Level
值 尝试访问层次结构行下一步的值会返回错误

我查阅了《游戏迁移指南》,但找不到与此相关的任何内容 问题

更新

这就是我提到的问题的功能

post.privacy_level_t.table_status.getDes() 
private boolean getPostsDetail(List post\u List){
home_page_posts=Json.newArray();
用于(职位:职位列表){
如果(!post.privacy_level_t.table_status.getDes().equals(“activated”))继续;
开关(post.post\u type.getPost\u type\u name()){
案例“星级评定”:
GetArrayNodeForNonystarPost(post);
继续;
案例“文本投票”:
GetArrayNodeForNonOnyPollPost(post);
继续;
案例“图像投票”:
GetArrayNodeForNonOnyPollPost(post);
继续;
案例“星级评级、职位、其他详情”:
GetArrayNodeForanystarPost(邮政);
继续;
违约:
继续;
}
}
返回true;
}

if条件中的代码在Play 2.6中返回NullPointerException什么是
getDes()
?你能一个模型一个模型地共享你的代码而不是把所有的东西放在一起吗?这让人困惑。@Zenoo getDes()是Table_Status模型中的一个公共getter方法。这段代码在Play2.5中运行良好,但在迁移到2.6之后就停止了工作。我根据您要求的模型/类对关系进行了分解。在您的示例中,如何获取
post
?您是否使用
查找器
?请分享游戏2.5中产生error.Finder方法的代码的上下文:public static Finder find=new Finder(Long.class,Privacy_Level.class);游戏2.6中的Finder方法:公共静态Finder find=新Finder(Privacy_Level.class);您还可以共享创建/获取
post\u列表
参数的位置吗?
post.privacy_level_t.table_status.getDes() 
 private boolean getPostsDetail(List<Posts> post_list){
       home_page_posts = Json.newArray();
       for(Posts post:post_list) {

           if(!post.privacy_level_t.table_status.getDes().equals("activated")) continue;
           switch (post.post_types.getPost_type_name()){
               case "Star_Rating":
                   getArrayNodeForNonAnonyStarPost(post);
                   continue;
               case "Text_Poll":
                   getArrayNodeForNonAnonyPollPost(post);
                   continue;
               case "Image_Poll":
                   getArrayNodeForNonAnonyPollPost(post);
                   continue;
               case "star_rating_post_other_detail":
                   getArrayNodeForAnonyStarPost(post);
                   continue;
               default:
                   continue;
           }
       }
       return true;
   }