4 ms·
Static type safety is one difference.
by recursive 6y ago
Static type safety is one difference.
- kingdomcome50 6y agoIt'd be more accurate to say the illusion of type safety. Under the hood many[0] ORMs simply construct a query similar to my example above and then convert result set of tabulated strings to the appropriate types (usually using reflection). This means two things: First, that the "type-safety" portions of an ORM are really located in the "mapping" code, so not really related to querying. And second: you don't really have type safety. A database schema could change at any time and break the code even if static analysis seems to think it should work. [0] Notable exceptions are languages that offer type providers (e.g. F#) but I digress
- recursive 6y agoThis particular illusion of safety actually provides some non-zero degree of safety. For instance, it prevents trivial typos in property names.