There is 1 update.
 
 
Reader Application / cid:jira-generated-image-avatar-ffb4fec0-8c70-49fd-8b4f-0cdf98e64914 XAREADER-5 Open

The flag queries compare a long property with a string

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-8ca5c903-71a1-4f59-a8fe-db8e2c19728d Changes by Thomas Mortagne on 17/Nov/26 15:35
 
Description: {{ReaderCode.DefaultPressReviewFormatter}} and {{ReaderCode.ReaderArticlesMacro}} compare the {{key}} long property of the flags with a string:

{noformat}
fkey.value = '$flag'
{noformat}

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.

Bind the flag as a {{Long}} query parameter instead (which also avoids injecting it in the query). This works with all the databases and all the Hibernate versions.


PS: This post was co-written with Claude Code.