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