Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/392.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 一个复杂的PlayFramework查询_Java_Jpa_Playframework_Playframework 1.x - Fatal编程技术网

Java 一个复杂的PlayFramework查询

Java 一个复杂的PlayFramework查询,java,jpa,playframework,playframework-1.x,Java,Jpa,Playframework,Playframework 1.x,我正在尝试构建以下内容: 我有一个类似Pinterest的模型,用户可以跟踪多个板,每个板都包含多个管脚。现在,我需要构建一个类似于Pinterest的home feed的东西,根据用户的后续操作,在上面的最新用户命令,在那里会出现一些新的PIN 换句话说,我需要类似以下伪查询的东西: Select all the Pins whose Board is contained within currentUser.followedBoards and order by dateAdded Desc

我正在尝试构建以下内容:

我有一个类似Pinterest的模型,用户可以跟踪多个板,每个板都包含多个管脚。现在,我需要构建一个类似于Pinterest的home feed的东西,根据用户的后续操作,在上面的最新用户命令,在那里会出现一些新的PIN

换句话说,我需要类似以下伪查询的东西:

Select all the Pins whose Board is contained within currentUser.followedBoards and order by dateAdded Desc and select the first 20;

我对“包含在”部分有点问题

如果您有一个具有followerdboards属性的用户类和一个具有pins属性的Board类,它类似于

select pin from User user join user.followedBoards board join board.pins pin ....