Fixes for #566
Test cases for #567
Fixes for #563
Changes in test cases related to #567
Merge branch 'trunk' of https://github.com/impetus-opensource/Kundera into trunk