Reputation: 29985
I I would like plugins to be able to add properties to my models. For example, I have a model "Message". A "Like" plugin can add property "likedtimes" to it and maintain it. How can I get such functionality?
One solution is to create a separate table and model for likes. But that would require a join or additional select whenever likes are to be displayed.
Upvotes: 4
Views: 2861
Reputation: 5454
Are you trying to replicate common functionality between Entities (not models)?
If so, I would recommend you implement your own behavior, using the built-in event system.
FYI: Difference between entities and models
Upvotes: 3