{"action":"opened","issue":{"url":"https://api.github.com/repos/wenhao/jpa-spec/issues/45","repository_url":"https://api.github.com/repos/wenhao/jpa-spec","labels_url":"https://api.github.com/repos/wenhao/jpa-spec/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/wenhao/jpa-spec/issues/45/comments","events_url":"https://api.github.com/repos/wenhao/jpa-spec/issues/45/events","html_url":"https://github.com/wenhao/jpa-spec/issues/45","id":528474705,"node_id":"MDU6SXNzdWU1Mjg0NzQ3MDU=","number":45,"title":"增加 boolean 值类型 Specification","user":{"login":"foreveryang321","id":5868190,"node_id":"MDQ6VXNlcjU4NjgxOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/5868190?v=4","gravatar_id":"","url":"https://api.github.com/users/foreveryang321","html_url":"https://github.com/foreveryang321","followers_url":"https://api.github.com/users/foreveryang321/followers","following_url":"https://api.github.com/users/foreveryang321/following{/other_user}","gists_url":"https://api.github.com/users/foreveryang321/gists{/gist_id}","starred_url":"https://api.github.com/users/foreveryang321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foreveryang321/subscriptions","organizations_url":"https://api.github.com/users/foreveryang321/orgs","repos_url":"https://api.github.com/users/foreveryang321/repos","events_url":"https://api.github.com/users/foreveryang321/events{/privacy}","received_events_url":"https://api.github.com/users/foreveryang321/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-11-26T04:09:25Z","updated_at":"2019-11-26T04:09:25Z","closed_at":null,"author_association":"NONE","body":"```java\r\nclass User {\r\n    private long id;\r\n    private boolean off = false;\r\n    // getter、setter\r\n}\r\n```\r\n希望可以这样\r\n```java\r\nPredicateBuilder<User> builder = Specifications.<User>and()\r\n                .eq(\"off\", true);\r\n// 或者增加一个支持\r\n/*\r\nPredicateBuilder<User> builder = Specifications.<User>and()\r\n                .true(\"off\");\r\nPredicateBuilder<User> builder = Specifications.<User>and()\r\n                .false(\"off\");\r\n*/\r\n```\r\n实际需要这样\r\n```java\r\nPredicateBuilder<User> builder = Specifications.<User>and()\r\n                .predicate((root, query, cb) -> cb.isTrue(root.get(\"off\")));\r\n```"}}
{"actor":{"display_login":"foreveryang321"}}