There is 1 update.
 
 
Farm Tools / cid:jira-generated-image-avatar-7aa480d6-2885-4e58-94d9-e72d6c08c290 FARMTOOLS-22 Open

The default language updater compares the translation flag of the pages with a string

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-1634ce53-4f08-4157-8821-ab6328a44823 Changes by Thomas Mortagne on 17/Nov/26 15:35
 
Description: {{FarmTools.DefaultLanguageUpdater}} compares the translation flag of the pages, which is an integer, with a string:

{noformat}
doc.translation='0'
{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.

Compare it with a number instead ({{doc.translation = 0}}). This works with all the databases and all the Hibernate versions.


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