Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator does not exist: boolean = integer #15

Open
moacirrcosta opened this issue Jan 22, 2016 · 0 comments
Open

Operator does not exist: boolean = integer #15

moacirrcosta opened this issue Jan 22, 2016 · 0 comments

Comments

@moacirrcosta
Copy link

Recently I've tried using the plugin and I had some problems about its use.
I added the annotation on the top of my domain class, created the field at my database with default value false, but when I was trying to execute "MyDomain.findById()" I got an error like this:

ERROR util.JDBCExceptionReporter - ERROR: operator does not exist: boolean = integer
Dica: No operator matches the given name and argument type(s). You might need to add explicit type casts.

The databse I use is postgres version 1.20.0 (Jul 13 2015, rev: REL-1_20_0) and grails 2.3.6.
After searching on the internet and reading the plugin's code I figure out the problem should be at the line 26 at the file LogicalDeleteGrailsPlugin.groovy, I just changed

from:
logicDeleteHibernateFilter(FilterDefinitionFactoryBean) {
defaultFilterCondition = "deleted = 0"
}
to:
logicDeleteHibernateFilter(FilterDefinitionFactoryBean) {
defaultFilterCondition = "deleted = '0'" //single quotes surround 0
}

Although it worked for me until now, I need to make more tests to be sure about that modification.

I'm writing that issue to ask if you guys have faced the same problem with other databases and if my modification should be a solution to that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant