This issue has been created
 
 
Meeting Manager / cid:jira-generated-image-avatar-b14fb3d7-8edc-497e-86e9-fdacf355d5d6 MEETING-523 Open

The list of my meetings compares the meeting date with a string

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-6c708366-6dd5-45c3-b65a-82cafe5bfdb6 Thomas Mortagne created this issue on 17/Nov/26 15:11
 
Summary: The list of my meetings compares the meeting date with a string
Issue Type: cid:jira-generated-image-avatar-b14fb3d7-8edc-497e-86e9-fdacf355d5d6 Bug
Affects Versions: 1.2
Assignee: Unassigned
Created: 17/Nov/26 15:11
Priority: cid:jira-generated-image-static-major-6bc687ba-c00f-48f3-843a-f89a5deeff48 Major
Reporter: Thomas Mortagne
Description:

MMCode.MeetingMyResults compares the date property of the meetings with a string:

date2.value >= '$today'

Since Hibernate 6, HQL checks the types of both sides of a comparison when the query is parsed, and rejects incompatible ones (SemanticException: Cannot compare left expression of type ... with right expression of type ...). XWiki is moving to Hibernate 7 (XWIKI-19708), where these queries will fail on every database. With Hibernate 5 the literal is copied as is in the SQL, so the queries rely on the database converting it implicitly, which not all databases do.

On Oracle, this already depends on the date format of the database session (NLS_DATE_FORMAT).

Bind the date as a java.util.Date query parameter instead. This works with all the databases and all the Hibernate versions.