{"action":"opened","issue":{"url":"https://api.github.com/repos/epimorphics/appbase/issues/13","labels_url":"https://api.github.com/repos/epimorphics/appbase/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/epimorphics/appbase/issues/13/comments","events_url":"https://api.github.com/repos/epimorphics/appbase/issues/13/events","html_url":"https://github.com/epimorphics/appbase/issues/13","id":89813780,"number":13,"title":"WResultSet.copy() not copying?","user":{"login":"ijdickinson","id":63979,"avatar_url":"https://avatars.githubusercontent.com/u/63979?v=3","gravatar_id":"","url":"https://api.github.com/users/ijdickinson","html_url":"https://github.com/ijdickinson","followers_url":"https://api.github.com/users/ijdickinson/followers","following_url":"https://api.github.com/users/ijdickinson/following{/other_user}","gists_url":"https://api.github.com/users/ijdickinson/gists{/gist_id}","starred_url":"https://api.github.com/users/ijdickinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijdickinson/subscriptions","organizations_url":"https://api.github.com/users/ijdickinson/orgs","repos_url":"https://api.github.com/users/ijdickinson/repos","events_url":"https://api.github.com/users/ijdickinson/events{/privacy}","received_events_url":"https://api.github.com/users/ijdickinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-20T20:21:32Z","updated_at":"2015-06-20T20:21:32Z","closed_at":null,"body":"I have the following Velocity code, which is passed a `WResultSetWrapper` instance:\r\n\r\n    #set( $hasResultsBefore = $results.hasNext())\r\n    #set( $nResults = 0)\r\n    #foreach ($r in $results.copy())\r\n      #set( $nResults = $nResults + 1)\r\n    #end\r\n    #set( $hasResultsAfter = $results.hasNext())\r\n\r\n    <p>results = $results<br />\r\n    hasResultsBefore = $hasResultsBefore <br />\r\n    hasResultsAfter = $hasResultsAfter\r\n    </p>\r\n\r\nGiving: \r\n\r\n    results = com.epimorphics.appbase.data.impl.WResultSetWrapper@54cf6de3\r\n    hasResultsBefore = true \r\n    hasResultsAfter = false\r\n\r\nExpected outcome is that `$hasResultsAfter` and `$hasResultsBefore` are the same, but the observed result suggests that the loop is iterating over the base result set not a copy."}}