| I don't like ORMs much, admittedly mostly because I did a fair amount of development with SQL before they existed. But, there was one that I played with that did have appeal to me, RedBeanPHP. Forgetting that it's PHP for a minute...that's not the main point. It was cool because it had a fluid way of working. It automatically generates the database, tables and columns... on-the-fly, and infers table relations based on naming conventions and how you interact with code. No config files at all. So, you would iterate in dev solely by writing code, and end up with a schema including foreign relationships. Then, you can "freeze" the schema for prod, turning off all the dynamic stuff. Their quick tour explains it well: https://redbeanphp.com/index.php?p=/quick_tour Note: I'm sure it has notable downsides over time, but the approach was really nice starting from scratch. |
Also tests: https://gist.github.com/johndoe46/17eacf0f12772dfb870732479b...
(This is proof of concept quality, don't use for real work)