Closed
Description
Version
1.24.0
What happened?
Override doesn't seem to work properly for foreign fields. I expected the profile_id
column to translate to uuid.UUID
.
Relevant log output
type CreateQueryParams struct {
ID uuid.UUID
ProfileID pgtype.UUID
}
// and
type Query struct {
ID uuid.UUID
ProfileID pgtype.UUID
Database schema
CREATE TABLE query
(
id uuid PRIMARY KEY,
profile_id uuid REFERENCES profile (id) ON DELETE CASCADE
)
SQL queries
-- name: CreateQuery :one
INSERT INTO query(id,profile_id) VALUES ($1, $2) RETURNING *;
Configuration
overrides:
- db_type: "uuid"
go_type:
import: "github.com/google/uuid"
type: "UUID"
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go