fix for issue#342, added test case to core
Merge branch 'trunk' of git@github.com:impetus-opensource/Kundera.git into trunk