{"action":"created","issue":{"url":"https://api.github.com/repos/bguerout/jongo/issues/284","repository_url":"https://api.github.com/repos/bguerout/jongo","labels_url":"https://api.github.com/repos/bguerout/jongo/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/bguerout/jongo/issues/284/comments","events_url":"https://api.github.com/repos/bguerout/jongo/issues/284/events","html_url":"https://github.com/bguerout/jongo/issues/284","id":127325509,"number":284,"title":"Strange Error in Aggregation with Jongo1.2","user":{"login":"yairbr","id":14369641,"avatar_url":"https://avatars.githubusercontent.com/u/14369641?v=3","gravatar_id":"","url":"https://api.github.com/users/yairbr","html_url":"https://github.com/yairbr","followers_url":"https://api.github.com/users/yairbr/followers","following_url":"https://api.github.com/users/yairbr/following{/other_user}","gists_url":"https://api.github.com/users/yairbr/gists{/gist_id}","starred_url":"https://api.github.com/users/yairbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yairbr/subscriptions","organizations_url":"https://api.github.com/users/yairbr/orgs","repos_url":"https://api.github.com/users/yairbr/repos","events_url":"https://api.github.com/users/yairbr/events{/privacy}","received_events_url":"https://api.github.com/users/yairbr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-18T22:44:25Z","updated_at":"2016-03-02T18:35:53Z","closed_at":null,"body":"I am using the aggregation framework in order to retrieve an inner object of an mongo object.\r\n\r\nthis is my query :\r\nList<InnerData> lst = lists.aggregate(matchQuery.toString()).and(unwindQuery.toString()).and(projectionQuery.toString()).as(InnerData.class);\r\n\r\n Thats the error i get- \r\n> Error:(177, 52) java: incompatible types: no instance(s) of type variable(s) T exist so that org.jongo.Aggregate.ResultsIterator<T> conforms to org.jongo.MongoCursor<main.java.DataTypes.InnerData>\r\n\r\nThe query works fine in Jongo 1.1, but when I write it with Jongo 1.2 i get an error the InnerData is incompatible type of T.\r\n\r\nMy drivers version is 3.0.0\r\nthanks "},"comment":{"url":"https://api.github.com/repos/bguerout/jongo/issues/comments/191363602","html_url":"https://github.com/bguerout/jongo/issues/284#issuecomment-191363602","issue_url":"https://api.github.com/repos/bguerout/jongo/issues/284","id":191363602,"user":{"login":"singhularity","id":289853,"avatar_url":"https://avatars.githubusercontent.com/u/289853?v=3","gravatar_id":"","url":"https://api.github.com/users/singhularity","html_url":"https://github.com/singhularity","followers_url":"https://api.github.com/users/singhularity/followers","following_url":"https://api.github.com/users/singhularity/following{/other_user}","gists_url":"https://api.github.com/users/singhularity/gists{/gist_id}","starred_url":"https://api.github.com/users/singhularity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singhularity/subscriptions","organizations_url":"https://api.github.com/users/singhularity/orgs","repos_url":"https://api.github.com/users/singhularity/repos","events_url":"https://api.github.com/users/singhularity/events{/privacy}","received_events_url":"https://api.github.com/users/singhularity/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T18:35:53Z","updated_at":"2016-03-02T18:35:53Z","body":"Hi,\r\nI'm trying to perform a simple aggregation using Jongo and I run into a similar issue where it does not accept  XYZ.class as argument in \"as\". Seems to work fine with find(). I don't see the issue with 1.1"}}