How to build relations to Multiple IDs separated by comma in Yii

Hello Friends,

I have to store the ids of a particular checkbox fields into one field. The values are primary keys in another table. But how will I build relation to the primary table.

The problem in nutshell

'p_additionalSoftwares' => array(self::BELONGS_TO, 'Product', 'additionalSoftwares')

Where additionalSoftwares is something like 23,45,68

How can I solve this?

Thanks is advance.

You can’t.

Maybe you want to read the guide and about relational databases.

The simplest way is not to use relations at all :)

You can do it by two subsequent queries.

It helps if you can show us some tables and pictures to make sure we are thinking the same thing as you do.