android - greenDAO: compare two properties with each other -


i sure should simple can't seem find solution.

say have table 5 fields (id, colour, size, scanned, expected)

how rows expected greater scanned?

i have tried

mydao.property.expected.gt(mydao.property.scanned).list() 

but returns 0 rows. using log_sql boolean can see looking property field, not value of field.

d/greendao: values query: [0, de.greenrobot.dao.property@33ecce97] 

greendao's querybuilder api not support (yet). have use raw query.

it this:

query myquery = mydao.querybuilder().where(new stringcondition(     property.expected.columnname + " > " + property.scanned.columnname)).build(); 

ps.: created feature request if want track future greendao version.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -