Skip to content

Wrong output of override #3005

Closed
Closed
@juliusmh

Description

@juliusmh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions