Is there any built in possibility to use two or more models with one table?
For example table
pubs and models
Interviews, which in database differs with column
For inserting record I can fill
type field in beforeCreate, so there is no problem;
But what to do with selecting rows?
The only way, I could think of - is to override
findFirst and all other select-methods, analyze "condition" field and add somethig like ".. AND type=1" to all queries.
But I can not say that I really like this solution.
May be there is another way?