reform icon indicating copy to clipboard operation
reform copied to clipboard

Allow custom types to be used as PKs

Open AlekSi opened this issue 7 years ago • 2 comments

WIP branch: https://github.com/go-reform/reform/tree/custom-type

For example: https://github.com/satori/go.uuid

We need to add correct imports to generated files. Two ways to do it:

  1. Import everything base file imports and use goimports (instead of gofmt) to remove unused ones.
  2. Replace go/build with go/types and go/importer (maybe also golang.org/x/tools/go/packages).

See also #191.

AlekSi avatar Jul 19 '16 21:07 AlekSi

So, there is no way to use uuid as primary key as of now or i can use string as\with a workaround? Probably this is not the best issue to ask in, but for sure it's related to the topic.

ghost avatar Sep 11 '18 15:09 ghost

string works. 😄

AlekSi avatar Sep 11 '18 15:09 AlekSi