I'm trying to create a relation to a postgres array column in Yii2 and it's giving me an error (not surprisingly)
SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: integer[] = integer
Just setting the standard onCondition() doesn't seem to work.
Anyone have experience working with postgres array types and Yii2 relations? It would be nice if I could do something like this to override the default operator and on condition to support array column type.
/**
* @return \yii\db\ActiveQuery
*/
public function getMyRelation()
{
return $this->hasMany(ModelName::className(), ['@>', 'id', '{'.intval($this->rel_id).'}'])->alias('myRelation');
}