Fixed issue DDC-2645
added Testcases for DDC-2645
removed public api
Merge branch 'master' of github.com:apa-opensource/doctrine2