News for hackers. Stuff that matters.
Re:MikroOrm v4 /w GraphQL example project that I created ove... by dfee on Monday August 10, 2020 @04:47PM (#24113802)
Ha. Well, one of 'em was just fixed. https://github.com/mikro-orm/mikro-orm/issues/725

There's also a known issue where an insert statement with an `undefined` for a field (rather than the lack of a presence) translates to a null (this is actually a `pg` driver situation). https://github.com/mikro-orm/mikro-orm/issues/719

Finally, the docs have entities which use TypeScript's `optional` indicator (e.g. `image?: string`).

Problem is, that reflects the state of an entity pre-creation. After creation it's going to be `null`, which will definitely escape the type system (you've got strict null checks on in TS, right?).

However, typing that same column as `image: string | null` actually produces a `columnType` of JSONB(?) rather than `STRING NULL`.

That's a couple examples, but yeah. I invested some heavy hours into the codebase this weekend.

There are no comments on this comment yet.