Skip to content

composite types don't work #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
skariel opened this issue Jan 29, 2020 · 1 comment · Fixed by #311
Closed

composite types don't work #309

skariel opened this issue Jan 29, 2020 · 1 comment · Fixed by #311

Comments

@skariel
Copy link

skariel commented Jan 29, 2020

the following code

CREATE TYPE type_foo AS (
    x integer,
    y integer
);

CREATE TABLE tdd.solution (
    solution_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
    bar foo
);

results in the following error:

 unknown PostgreSQL type: type_foo
@clansofts
Copy link

@skariel add overides as below

.....
"overrides": [
{
"go_type": "path/to/your/generated/models/db.TypeFoo",
"db_type": "public.type_foo",
"null": true
}
]

Then re-generate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants