4 ms·
I disagree. How would you be able to validate data that you can map to your tables without hitting the db? If you wanted to add a new row of data to one of yo
by shroompasta 4y ago
I disagree.
How would you be able to validate data that you can map to your tables without hitting the db?
If you wanted to add a new row of data to one of your tables, you would have to hit the db, get row columns and make sure that data fits.
Or you could write out your table structure separately outside of the db, and validate against that, but that would just leave you with two sources of truth which is an antipattern.
Or you could just use an ORM.
I'm fluent in SQL, and understand the solutions that ORMs solve - it's not just a pure abstraction over sql queries, but the tooling and utility provided wrapping around that is what makes it so powerful.