|
|
|
|
|
by sfilipov
2637 days ago
|
|
I don't disagree overall but I'm using SQLAlchemy (Python) on a daily basis and it works quite well. I agree that if you are building ORM with the intention of hiding so many SQL details that the developers don't need to learn SQL, you'll run into problems. SQLAlchemy on the other hand starts simple, but is flexible enough that you can do inner/outer joins, you have different loading strategies etc. It is quite nice if you are proficient enough in SQL. When writing complicated select queries, I'd start by writing the raw SQL then spend my time representing it in SQLAlchemy. It's a bit less than double the work sometimes, but working with the SQLAlchemy objects in Python is quite nice as long as you pull them in an efficient manner. SQLAlchemy just feels like a well thought out ORM. |
|
If you define your database properly typed, defaulted, and not null unless an update field that sort of layer isn't needed at all.
Using the correct native types on your function params or class structures means you'll never run into type mismatch or cast failures loading or unloading from the db.
So I just don't get why the need for ORM. The only thing that needs mapping is the table schema to your data type object/structs.
ORMs don't offer anything of value their and often make things you need to do in your job harder.