{"action":"opened","issue":{"url":"https://api.github.com/repos/spring-projects/spring-data-examples/issues/209","repository_url":"https://api.github.com/repos/spring-projects/spring-data-examples","labels_url":"https://api.github.com/repos/spring-projects/spring-data-examples/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-examples/issues/209/comments","events_url":"https://api.github.com/repos/spring-projects/spring-data-examples/issues/209/events","html_url":"https://github.com/spring-projects/spring-data-examples/issues/209","id":172358307,"number":209,"title":"querydsl of mongodb execute Relational query errors","user":{"login":"marskobe","id":15043563,"avatar_url":"https://avatars.githubusercontent.com/u/15043563?v=3","gravatar_id":"","url":"https://api.github.com/users/marskobe","html_url":"https://github.com/marskobe","followers_url":"https://api.github.com/users/marskobe/followers","following_url":"https://api.github.com/users/marskobe/following{/other_user}","gists_url":"https://api.github.com/users/marskobe/gists{/gist_id}","starred_url":"https://api.github.com/users/marskobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marskobe/subscriptions","organizations_url":"https://api.github.com/users/marskobe/orgs","repos_url":"https://api.github.com/users/marskobe/repos","events_url":"https://api.github.com/users/marskobe/events{/privacy}","received_events_url":"https://api.github.com/users/marskobe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-22T02:26:12Z","updated_at":"2016-08-22T02:26:12Z","closed_at":null,"body":"I hava two related entities like this:\r\n` \r\n@Document(collection = \"lmt_limit\") \r\npublic class LimitEntity implements Serializable {  \r\n     /**    * 主键    */   \r\n    @Id   \r\n    private Long id;   \r\n\r\n     /**    * 关联Entity：封禁原因    */   \r\n    @DBRef   \r\n    private ReasonEntity reason;  \r\n} \r\n\r\n @Document(collection = \"lmt_reason\") \r\npublic class ReasonEntity implements Serializable {  \r\n     /**    * 主键    */   \r\n    @Id   \r\n    private Integer id;    \r\n\r\n    /**    * 封禁原因message值    */   \r\n    private String message;  \r\n} \r\n`\r\nLimitEntity is @DBRef  ReasonEntity, and in my mongodb database's lmt_limit Collection I hava two Document like this:\r\n\r\n /* 0 */\r\n{\r\n    \"_id\" : NumberLong(1),\r\n    \"_class\" : \"tv.acfun.cloud.service.limit.entity.LimitEntity\",\r\n    \"reason\" : {\r\n          \"$ref\" : \"lmt_reason\",\r\n          \"$id\" : 1\r\n    }\r\n}\r\n\r\n/* 1 */\r\n{\r\n    \"_id\" : NumberLong(2),\r\n    \"_class\" : \"tv.acfun.cloud.service.limit.entity.LimitEntity\",\r\n    \"reason\" : {\r\n          \"$ref\" : \"lmt_reason\",\r\n          \"$id\" : 2\r\n    }\r\n}\r\n\r\n\r\n\r\nso I want to query LimitEntity by ReasonEntity's attribute like this:\r\n\r\n`\r\nBooleanBuilder booleanBuilder = new BooleanBuilder();\r\nbooleanBuilder.and(QLimitEntity.limitEntity.reason.id.eq(1));\r\n\r\nPaginate page = new Paginate(limitRepository.findAll(booleanBuilder, pageRequest));\r\n`\r\nMy pageRequest has pageNum as 0, and pageSize as 20, Theoretically the result page should has one data record, but the truth is I have get nothing. so how does this happen ??\r\n\r\nMy querydsl version is 3.7.4.\r\n\r\nFinally I rememberd Original I can get the Correct results，but I don't know why is it suddenly not!!"}}
{"actor":{"display_login":"marskobe"}}