Java 一个复杂的PlayFramework查询
我正在尝试构建以下内容: 我有一个类似Pinterest的模型,用户可以跟踪多个板,每个板都包含多个管脚。现在,我需要构建一个类似于Pinterest的home feed的东西,根据用户的后续操作,在上面的最新用户命令,在那里会出现一些新的PIN 换句话说,我需要类似以下伪查询的东西: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
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 ....