After digging a little deeper i discovered the hibernate generated sql is returning all contacts from the database despite whether or not the companyid is 'AM22' or 'am22'.
In my test case on i'm calling this method:
Code:
Company company = companyDao.getCompany("AM22");
Here's what i see after turning debug on:
Code:
2007-04-06 11:21:46,939 DEBUG [org.hibernate.engine.CollectionLoadContext] - <2 collections were found in result set for role: com.shawmut.model.company.Company.activeContacts>
2007-04-06 11:21:46,955 DEBUG [org.hibernate.engine.CollectionLoadContext] - <collection fully initialized: [com.shawmut.model.company.Company.activeContacts#AM22]>
2007-04-06 11:21:46,955 DEBUG [org.hibernate.engine.CollectionLoadContext] - <collection fully initialized: [com.shawmut.model.company.Company.activeContacts#am22]>
2007-04-06 11:21:46,955 DEBUG [org.hibernate.engine.CollectionLoadContext] - <2 collections initialized for role: com.shawmut.model.company.Company.activeContacts>
So it looks like Hibernate found 2 collections, one for 'AM22' and one for 'am22'. Hibernate only seems to return the collection with the CompannyID i originally asked for. I'm not sure what to do from here. I need to dig a little deeper.
I wonder if anyone else has ran into this situation.