gorma
gorma copied to clipboard
Auto-ID field creation is broken
Gorma's automatic insertion of a primary-key field named "ID" is an excellent way to DRY out my model definitions: https://github.com/goadesign/gorma/blob/master/dsl/relationalmodel.go#L43
Alas, although my models have a field definition for ID, the generated Storage interface is lacking an "ID" parameter, making the auto-ID a bit useless unless I evade the storage layer and interact with gorm directly.
According to @bketelsen:
in a refactor that code never gets called in the order that would make it useful. I would be very appreciative of a PR that solves this
I'm opening this issue to promote awareness/understanding in case anyone else runs into the problem, and perhaps eventually to contribute a fix.
PR in progress should resolve this #118