one more thing… what about $sequenceName? i understand the mechanism is not implemented… yet ? I read somewhere in Definitive Guide changelog:
Version 1.0.9 September 6, 2009
- Bug: Set sequenceName in Oracle tables to be empty string so that yiic model command generates correct validation rules for PK (Qiang)
some time ago, that if you want to use sequences u must set it … somewhere, but i cannot find it now. Weird.
Probably it will work. I checked schema implementation and I think it will work.
It is not as it wasn’t implemented. It could not be automatically implemented, because Oracle doens’t allow us to define a explicity connection between Tables and Sequences (as it is in Postgres), so there is no way to automatically catch the corresponding sequence for the table.
Then, I had to set sequenceName to NULL, otherwise, PK rules would not be Ok.
Anyway, I don’t like to reference sequence names in my code, then I prefer triggers.