Yii2: Error ExistValidator, ORA-00936: missing expression

Created on 23 May 2017  路  2Comments  路  Source: yiisoft/yii2

What steps will reproduce the problem?

use "exist" rule in model

What is the expected result?

checks if the value being validated can be found in the table column

What do you get instead?

ORA-00936: missing expression
The SQL being executed was: SELECT EXISTS(SELECT * FROM "table" WHERE ("field_id"='1'))

Additional info

i think the query its should be like this
select count(*) from dual where EXISTS(SELECT * FROM "table" WHERE ("field_id"='1'))

| Q | A
| ---------------- | ---
| Yii version | 2.0.11
| PHP version | 5.6
| Operating system | Windows
| Database | Oracle 12c

Oracle to be verified bug

Most helpful comment

i'm sorry, my bad, it is not yii2 problem but my extension that i used. my extension refer to yii\db\QueryBuilder instead of yii\db\oci\QueryBuilder

All 2 comments

@alvinux why did you close it?

i'm sorry, my bad, it is not yii2 problem but my extension that i used. my extension refer to yii\db\QueryBuilder instead of yii\db\oci\QueryBuilder

Was this page helpful?
0 / 5 - 0 ratings