Hibernate version:
2.1.3 (tested with 2.1.7 as well)
I have a a named native sql query that returns about 20,000 records. The basic format of query is as follows
select
a.field1 as {cat.field1},
a.field2 as {cat.field2},
a.field3 as {cat.field3},
b.field1 as {hat.field1},
b.field2 as {hat.field2},
b.field3 as {hat.field3}
from
catTable a inner join hatTable b on a.field2 = b.field1
where every cat has one and only one hat and cat is also mapped to hat as cat.getHat().
If I check every result that is returned in the following manner
cat.getField2 == hat.getField1
and since caching is turned on this is the same as
cat.getField2 == cat.getHat().getField1
many of the results end up being incorrectly mapped. Has anyone ever experience a problem like this? Im happy to explain in more detail if this is unclear..
Thanks
|