{"action":"created","issue":{"url":"https://api.github.com/repos/nhibernate/nhibernate-core/issues/735","repository_url":"https://api.github.com/repos/nhibernate/nhibernate-core","labels_url":"https://api.github.com/repos/nhibernate/nhibernate-core/issues/735/labels{/name}","comments_url":"https://api.github.com/repos/nhibernate/nhibernate-core/issues/735/comments","events_url":"https://api.github.com/repos/nhibernate/nhibernate-core/issues/735/events","html_url":"https://github.com/nhibernate/nhibernate-core/issues/735","id":264925592,"node_id":"MDU6SXNzdWUyNjQ5MjU1OTI=","number":735,"title":"NH-2903 - Support CreateFilter for a collection of components","user":{"login":"nhibernate-bot","id":20959043,"node_id":"MDQ6VXNlcjIwOTU5MDQz","avatar_url":"https://avatars3.githubusercontent.com/u/20959043?v=4","gravatar_id":"","url":"https://api.github.com/users/nhibernate-bot","html_url":"https://github.com/nhibernate-bot","followers_url":"https://api.github.com/users/nhibernate-bot/followers","following_url":"https://api.github.com/users/nhibernate-bot/following{/other_user}","gists_url":"https://api.github.com/users/nhibernate-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/nhibernate-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhibernate-bot/subscriptions","organizations_url":"https://api.github.com/users/nhibernate-bot/orgs","repos_url":"https://api.github.com/users/nhibernate-bot/repos","events_url":"https://api.github.com/users/nhibernate-bot/events{/privacy}","received_events_url":"https://api.github.com/users/nhibernate-bot/received_events","type":"User","site_admin":false},"labels":[{"id":717851256,"node_id":"MDU6TGFiZWw3MTc4NTEyNTY=","url":"https://api.github.com/repos/nhibernate/nhibernate-core/labels/c:%20Core","name":"c: Core","color":"ededed","default":false},{"id":718400270,"node_id":"MDU6TGFiZWw3MTg0MDAyNzA=","url":"https://api.github.com/repos/nhibernate/nhibernate-core/labels/migrated","name":"migrated","color":"ededed","default":false},{"id":717851255,"node_id":"MDU6TGFiZWw3MTc4NTEyNTU=","url":"https://api.github.com/repos/nhibernate/nhibernate-core/labels/p:%20Trivial","name":"p: Trivial","color":"fef2c0","default":false},{"id":661468479,"node_id":"MDU6TGFiZWw2NjE0Njg0Nzk=","url":"https://api.github.com/repos/nhibernate/nhibernate-core/labels/t:%20Improvement","name":"t: Improvement","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-12T12:38:29Z","updated_at":"2018-12-19T20:57:00Z","closed_at":null,"author_association":"COLLABORATOR","body":"**felice Pollano** created an [issue](http://nhibernate.jira.com/browse/NH-2903) — <time datetime=\"2011-09-30T15:52:36.016Z\" title=\"2011-09-30T15:52:36.016Z\">30th September 2011, 15:52:36</time>:\r\n> NOTE: this is a correction for NH-2902\r\n> \r\n> \r\n> I have an entity with a list of components ( bag ). Trying to count this collection without loading it by issuing `session.CreateFilter( collection,\"select count( * )\")` does not work and return the following error:\r\n> \r\n> > NHibernate.QueryException : collection of values in filter: this [select count(*)]\r\n> \r\n> Similar situation happens if we try to page the collection with:\r\n> \r\n> ```csharp\r\n> session.CreateFilter(result.Children,string.Empty)\r\n>                         .SetFirstResult(first)\r\n>                         .SetMaxResults(count)\r\n>                         .List();\r\n> ```\r\n> \r\n> with this error:\r\n> \r\n> NHibernate.QueryException : collection of values in filter: this []\r\n> \r\n> I can overtake the first problem with Linq2NH by selecting the count of the collection in the query, but I have no idea on how to achieve the second, this is the reason I'm trying to use CreateFilter. If there is a better way to page a children collection I would love to tnow how. If there isn't, I attached a unit test to show the problem. \r\n> \r\n---\r\n**Julian Maughan** added a comment — <time datetime=\"2012-02-24T15:47:53.393Z\" title=\"2012-02-24T15:47:53.393Z\">24th February 2012, 15:47:53</time>:\r\n> This is not currently supported, so I have changed this issue from a Bug to an Improvement for a future version.\r\n> \r\n---\r\n**Ricardo Peres** added a comment — <time datetime=\"2014-11-19T21:54:29.355Z\" title=\"2014-11-19T21:54:29.355Z\">19th November 2014, 21:54:29</time>:\r\n> An alternative approach: https://weblogs.asp.net/ricardoperes/querying-an-uninitialized-collection-with-nhibernate\r\n> "},"comment":{"url":"https://api.github.com/repos/nhibernate/nhibernate-core/issues/comments/448741118","html_url":"https://github.com/nhibernate/nhibernate-core/issues/735#issuecomment-448741118","issue_url":"https://api.github.com/repos/nhibernate/nhibernate-core/issues/735","id":448741118,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODc0MTExOA==","user":{"login":"hazzik","id":144791,"node_id":"MDQ6VXNlcjE0NDc5MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/144791?v=4","gravatar_id":"","url":"https://api.github.com/users/hazzik","html_url":"https://github.com/hazzik","followers_url":"https://api.github.com/users/hazzik/followers","following_url":"https://api.github.com/users/hazzik/following{/other_user}","gists_url":"https://api.github.com/users/hazzik/gists{/gist_id}","starred_url":"https://api.github.com/users/hazzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazzik/subscriptions","organizations_url":"https://api.github.com/users/hazzik/orgs","repos_url":"https://api.github.com/users/hazzik/repos","events_url":"https://api.github.com/users/hazzik/events{/privacy}","received_events_url":"https://api.github.com/users/hazzik/received_events","type":"User","site_admin":false},"created_at":"2018-12-19T20:57:00Z","updated_at":"2018-12-19T20:57:00Z","author_association":"MEMBER","body":"This does not work because `CreateFilter` does not support a collection of components."}}
{"actor":{"display_login":"hazzik"}}