I built a mini ORM instead of using one — was this a bad idea?

I built a simple ORM from scratch to understand how they work under the hood, and I’d like some feedback on the design.

Instead of using existing ORMs, I tried to recreate the core ideas myself (model mapping, query building, basic relationships). The goal wasn’t performance, but to really understand the abstraction layer between code and SQL.

One thing I found challenging was designing the query builder in a way that stays flexible without becoming messy.

I’d really appreciate feedback on:

  • API design (does it feel intuitive?)

  • Structure / code organization

  • Anything that looks like a bad practice

Docs + examples: https://lol44lol.github.io/classo-docs/

Also curious — for those who’ve built something similar, what was the hardest part for you?

For a learning project, the query builder is a good place to focus, but make it produce SQL and bound parameters separately from the start. That makes injection bugs easier to avoid and gives you a clear thing to test. I’d also test relationships for missing rows and duplicate results; that’s where a small ORM can get confusing fast. I can’t judge the API or code organization without reviewing the implementation.