Cactiverecord Doesn't Work With Mysql Partitioned Table


I’m trying to build a new app with existing database.

some of the tables ih the db are partitioned by some fields.

which means that the primary key contains multiplefields.

because of MySQL’s requirement.…nique-keys.html

in fact, each table has "id" column with uuid style.

I’d like to specify to use only that “id” as a “primaryKey” of each ActiveRecord model.

Is it impossible?

Overload the primaryKey() method to redefine which column(s) are the primary key.

I use it when creating models for views which doesn’t have PKs at all.


can that work correctly with activerecord’s “relationship”?

CActiveRelation.foreignKey can take a set of fields, so yes.