我遇到了一个特殊的问题,即hql查询在Windows上按预期工作但在Linux上没有。
以下是查询:
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))))
说明:我从数据库中获取资源,这些资源是活动的,已发布的,公开的或与组织共享的资源,以便共享永远或在2个日期之间。
我在两个数据库中都有相同的数据(从Linux导出并在Windows中导入)。 在窗户上,我得到 结果大小= 275
在Linux中我得到了 结果大小= 0
我查看了Linux中的数据,我发现我应该得到非零的结果大小。
Windows具有Java 1.5,而Linux具有Java 1.6
关于我应该在哪里解决这个问题的任何建议?
谢谢!
答案 0 :(得分:1)