Fixed issue #176
and added test case against it
Merge branch 'trunk' of github.com:impetus-opensource/Kundera into trunk