I've run into a peculiar problem where a hql query is working as expected on Windows but does not on Linux.
Here is the query:
select distinct resource from Resource resource , ResourceOrganization ro where (resource.active=true) and (resource.published=true) and ((resource.resourcePublic=true) or ((ro.resource.id=resource.id and ro.organization.id=2) and ((ro.resource.id=resource.id and ro.forever=true) or (ro.resource.id=resource.id and current_date between ro.startDate and ro.endDate))))
Explanation: I'm fetching resources from database where they are active, published and either public or shared with an organization such that the sharing is either forever or between 2 dates.
I have the same data in both the databases (exported from Linux and imported in Windows). On windows I get Result size = 275
and in Linux I get Result size = 0
I've looked at the data in Linux and I see that I should get non-zero result size.
Windows has Java 1.5 whereas Linux has Java 1.6
Any suggestions on where I should look to address this problem?
Thanks!
|