You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2026/10/15 09:46:00 UTC
[jira] [Resolved] (FINERACT-2951) Deactivating a charge fails on PostgreSQL with "operator does not exist: boolean = integer"
[ https://issues.apache.org/jira/browse/FINERACT-2951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Saghy resolved FINERACT-2951.
----------------------------------
Assignee: Mandib Chaulagain
Resolution: Fixed
> Deactivating a charge fails on PostgreSQL with "operator does not exist: boolean = integer"
> -------------------------------------------------------------------------------------------
>
> Key: FINERACT-2951
> URL: https://issues.apache.org/jira/browse/FINERACT-2951
> Project: Apache Fineract
> Issue Type: Bug
> Components: Charges
> Affects Versions: 1.7.0, 1.14.0, 1.15.0, 1.16.0
> Environment: develop (d4ef4069547fba99400871877ceefadb62ad585b), PostgreSQL 18.3
> Reporter: Mandib Chaulagain
> Assignee: Mandib Chaulagain
> Priority: Major
> Fix For: 1.16.0
>
> Attachments: image-2026-10-14-19-46-56-148.png
>
>
> On PostgreSQL, deactivating a charge fails.
> Here are the steps to reproduce:
> # Create any charge: POST /v1/charges
> # Deactivate the charge: PUT /v1/charges/\{id} with this request body:
> {code:json}
> {
> "active": false,
> "locale": "en"
> }
> {code}
> And you get this error (reproduced on develop with PostgreSQL 18.3):
> !image-2026-10-14-19-46-56-148.png!
> Here is the response body in text:
> {code:json}
> {
> "developerMessage": "The request caused a data integrity issue to be fired by the database.",
> "httpStatusCode": "403",
> "defaultUserMessage": "ERROR: operator does not exist: boolean = integer\n Hint: No operator matches the given name and argument types. You might need to add explicit type casts.\n Position: 96",
> "userMessageGlobalisationCode": "error.msg.data.integrity.issue",
> "errors": [
> {
> "developerMessage": "The request caused a data integrity issue to be fired by the database.",
> "defaultUserMessage": "ERROR: operator does not exist: boolean = integer\n Hint: No operator matches the given name and argument types. You might need to add explicit type casts.\n Position: 96",
> "userMessageGlobalisationCode": "error.msg.data.integrity.issue",
> "args": []
> }
> ]
> }
> {code}
> It works on MySQL/MariaDB but doesn't on PostgreSQL. The query in ChargeWritePlatformServiceJpaRepositoryImpl.isAnySavingsProductsAssociateWithThisCharge compares exists(...) with 1. The three similar queries in the same class were fixed in FINERACT-984, but this one still has the "= 1".
> It's not working right now because of PostgreSQL's stricter type checks as it doesn't allow comparison of boolean with integer unlike MySQL/MariaDB.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)