Fixed code and query releated issues in collectionRepository hibernate
Merge pull request #390 from sheebans/master

Fixed code and query releated issues in collectionRepository hibernate