문제

I have a gridView in my program which it's data are populated with my ActiveRecord model.according to this answer I added some extra properties in my ActiveRecord to enable adding extra filtering column.
My queston is that is this a right way for doing such things.I mean adding some property which can not be matched with database table fields.
If not whcih approaches can be used in these scenarios?

도움이 되었습니까?

해결책

There's nothing bad with adding a property that doesn't match a database field. It's widely used approach and you can rely on it. Here's an example from yii wiki.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top