{"action":"opened","issue":{"url":"https://api.github.com/repos/my2iu/Jinq/issues/19","labels_url":"https://api.github.com/repos/my2iu/Jinq/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/my2iu/Jinq/issues/19/comments","events_url":"https://api.github.com/repos/my2iu/Jinq/issues/19/events","html_url":"https://github.com/my2iu/Jinq/issues/19","id":120545920,"number":19,"title":"How get primaryKeys By Jinq ?","user":{"login":"flyzb618","id":7271358,"avatar_url":"https://avatars.githubusercontent.com/u/7271358?v=3","gravatar_id":"","url":"https://api.github.com/users/flyzb618","html_url":"https://github.com/flyzb618","followers_url":"https://api.github.com/users/flyzb618/followers","following_url":"https://api.github.com/users/flyzb618/following{/other_user}","gists_url":"https://api.github.com/users/flyzb618/gists{/gist_id}","starred_url":"https://api.github.com/users/flyzb618/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyzb618/subscriptions","organizations_url":"https://api.github.com/users/flyzb618/orgs","repos_url":"https://api.github.com/users/flyzb618/repos","events_url":"https://api.github.com/users/flyzb618/events{/privacy}","received_events_url":"https://api.github.com/users/flyzb618/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-05T10:33:19Z","updated_at":"2015-12-05T10:33:19Z","closed_at":null,"body":"I add below code into JinqJPAStreamProvider:\r\n      public JPAJinqStream selectPrimaryKeys(JPAJinqStream base) {\r\n\t\tJPAQueryComposer jpaComposer = ((QueryJPAJinqStream) base).jpaComposer;\r\n\t\tSelectFromWhere query = (SelectFromWhere) jpaComposer.query;\r\n\t\tSelectFromWhere copy = query.shallowCopy();\r\n\t\torg.jinq.jpa.jpqlquery.RowReader reader = copy.getRowReader();\r\n\t\tColumnExpressions columnExpressions = new ColumnExpressions(reader);\r\n\t\tcolumnExpressions.columns.add(new ReadFieldExpression(\r\n\t\t\t\t((SelectOnly) (copy)).cols.getOnlyColumn(), \"id\"));\r\n\t\tcopy.cols = columnExpressions;\r\n\t\treturn new QueryJPAJinqStream(JPAQueryComposer.findAllEntities(\r\n\t\t\t\tmetamodel, cachedQueries, lambdaAnalyzer,\r\n\t\t\t\tjpqlQueryTransformConfigurationFactory, jpaComposer.em, hints,\r\n\t\t\t\tcopy));\r\n\t}\r\n\r\nBut  there is erro in \"toList\" when I run below code , why?\r\n       JPAJinqStream<Object> idStream =new JinqJPAStreamProvider(getEntityManager()\r\n\t\t\t\t\t.getMetamodel()).selectPrimaryKeys(stream);\t\t\t\r\n\tList<Object> idList = idStream.toList() ;"}}