I've found that the code that should return the GarageSpot (child class) will CORRECTLY return a GarageSpot, if I have not returned that same object as a Spot (parent object) earlier in the session.
Example 1: I select all spots (garage and other) into a list (uses HQL) I pick one of them and attempt to load it into a GarageSpot Hibernate returns a Spot class instead of a GarageSpot, though the query that it ran joined in the GarageSpot table
Example 2: I do not select all spots, but instead just load a particular GarageSpot Hibernate returns a GarageSpot, as expected.
The problem seems to be that the Spot Entity was cached, though I have tried to turn off all caching. So what I'm trying to do here is to empty the cache so the new search wont take the old cached objects... how can i disable the cache on hibernate
Is there some other reason I would get these results?
|