e798bfe34a
There was a bug in the "INSTANCE OF" operator as described in https://groups.google.com/forum/#!topic/doctrine-user/B8raq8CNMgg "INSTANCE OF" was not taking into account subclasses. It was merely translating the class to its discriminator. This is not correct since the class can have subtypes and those are, indeed, still instance of the superclass. Also, classes may not have a discriminator (e.g. abstract classes). This commit also provides useful tests to avoid regression.