3 ms·
> Approaches like "let's inherit from ORM class and add business-related methods", in my experience, lead to total disaster. I don't disagree, in fact I'd go f
by flukus 10y ago
> Approaches like "let's inherit from ORM class and add business-related methods", in my experience, lead to total disaster.
I don't disagree, in fact I'd go further and say that data and logic should not be coupled, but this is the Active record pattern which is far from the only way to use an ORM, most ORM's won't even support this pattern by default.
- spdionis 10y agoMoreover this is a terrible pattern. I would never use an ORM like that. An ORM implemented using the DataMapper pattern is so much better.