> The issue here is not related to the `REFERENCES` constraint, but rather that `sqlc` treats nullable fields differently from not-nullable fields when considering overrides. You can either mark the `user_id` field as `NOT NULL` or you can add an additional override for the nullable type:
I have the same issue with version v1.25.0
https://play.sqlc.dev/p/c0783e2fdd1ba1dfeca0b396bb9f0cbe3ce79a22a552aecd7565bda94ff68cec
sqlc.yaml
schema.sql
query.sql
Generated
models.go
Generated
query.sql.go
I expect sqlc to generate
ParentID *uuid.UUID
Originally posted by @illiafox in https://github.com/sqlc-dev/sqlc/issues/2738#issuecomment-2429842964