3 ms·
I’ve given up on the entire concept. I’ve used several ORM frameworks, and when interfacing with real world data models (not constructing one from scratch to fi
by Joeri 9y ago
I’ve given up on the entire concept. I’ve used several ORM frameworks, and when interfacing with real world data models (not constructing one from scratch to fit the ORM) I’ve found that writing raw queries and some marshalling code is usually faster and easier to maintain than using the ORM. Plus, the ORM-based models are usually significantly harder to test.
- BigChiefSmokem 9y agoDon't forget the overhead that comes with the ORM framework as well. I happen to be of the opinion that ORMs are good for prototyping and very small data models and one-off type projects but not for big leagues, production ready code. For that I would do as you describe and build my own data connector.
- GordonS 9y agoORMs promised to make things simpler, and were considered 'best practice' for a long time. I used them myself for several years, mainly NHinernate and Entity Framework. But on every project I'd spend a lot of time fighting with it, trying to bend it to my will. It's invariably difficult to create mappings with any complexity, such as composite keys. And the queries they generate are usually inefficient monstrosities. I discovered CQRS and micro-ORMs a few years ago, and with few exceptions, I haven't looked back!