wilsonehusin/typeid-sqlc-shim

Foreign keys are not overridden

Opened this issue · 0 comments

Let's say that we have tables books and authors. An entry from books has column author_id.

The generated model from sqlc will have Author struct with ID of TypeID, but the field AuthorID in Book struct will still have primitive type.

This seems difficult to solve without doing real database lookup though.