Gii With Oracle - Rownumid Issue

Hello everyone!

I’m having a problem with Gii + Oracle

Just to be clear, I’m using yii2.

As a side note, generating one single model with Gii takes 5+ minutes.

I generate a Model and then a CRUD page for that model, when I try to open that page I get:


Unknown Property – yii\base\UnknownPropertyException

Setting unknown property: app\models\EQUIPOLOCALIZADO::ROWNUMID

This happens only if the table of that CRUD generated with Gii has data.

This means that there’s no attribute “ROWNUMID” in my class EQUIPOLOCALIZADO? Should I add that? if so, why?

The class that’s throwing the exception is in vendor/yiisoft/yii2/base/Component.php




        if (method_exists($this, 'get' . $name)) {

            throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);

        } else {

            throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);

        }

If I comment the line that’s throwing the exception everything seems to work fine. I don’t know where that ROWNUMID attribute might be needed.

This is all code generated by Gii only.

Any help would be appreciated.

I’m following a definitive guide to yii2 and, while making the example from scratch, encountered the same issue.

Component.php throws the exception because I don’t have setters and getters defined for my model attributes. ROWNUMID apparently is a model attribute. If I set these setters and getters the exception is gone.

Any clarification on this?

I don’t know how to fill these setters and getters properly.

That’s because reading schema from Oracle is very slow operation.

The rest of the issue is kinda mystery to me. Would you please create an issue at github about it providing a schema for the table?

Hello samdark, here’s the issue (can’t post links, issue #4305 at github) including schema with data.

Greetings