What database system are you using and what does your domain model look like exactly?
I have also investigated your support request on this matter, and both the query mentioned there and this (simpler) one execute fine on my local PostgreSQL installation. However, I have used a very simple model based on your queries, without any inheritance, and an (almost) empty database. I suspect the exception is either caused by inheritance or corrupt data being returned from the DB.
Please send us a complete test case including database in our support system. I will update this answer with the final solution when we find it.