Is it possible to have a "hasMany" relationship depended on a column value?
IE
users (has-many) id | data | ...
$this->hasMany("id", "files", "objectId", array(
'alias' => 'userFiles'));
// is there some way to add some type of if type ="users"
customers (has-many) id | data | ...
$this->hasMany("id", "files", "objectId", array(
'alias' => 'customerFiles'));
// is there some way to add some type of if type ="customer"
files (belongs-to) id | type | objectId | data
$this->belongsTo(/* ??? */);