reform
reform copied to clipboard
Allow custom types to be used as PKs
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:
- Import everything base file imports and use
goimports
(instead ofgofmt
) to remove unused ones. - Replace
go/build
withgo/types
andgo/importer
(maybe alsogolang.org/x/tools/go/packages
).
See also #191.
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.
string
works. 😄