Skip to content
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

Auto-ID field creation is broken #106

Open
xeger opened this issue Jun 1, 2016 · 1 comment
Open

Auto-ID field creation is broken #106

xeger opened this issue Jun 1, 2016 · 1 comment

Comments

@xeger
Copy link
Contributor

xeger commented Jun 1, 2016

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.

@bketelsen
Copy link
Member

PR in progress should resolve this #118

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

No branches or pull requests

2 participants