Greetings! (Sorry title is misleading. I mean load from dao vs hibernateTemplate.load)
I am running a unit test comparing my dao loading of an object and an object loaded directly using hibernate template. The same style of testing, found in the petclinic example, except that I am using a "hibernateTemplate" instead of "jdbcTemplate".
When I run the following function, it fails; indicating to me that two different objects were loaded. Don't understand why this is the case, since I am loading the same object within the same session.
Code:
public void testloadCatalog () {
Catalog catalog = catalogDao.loadCatalog(TEST_CATALOG);
assertEquals("HQL query must get the same persistent Catalog object", hibernateTemplate.load(Catalog.class, TEST_CATALOG), catalog);
}
Curtney