Entity inheritance and the Query API