goadesign / gorma

Storage generation plugin for Goa
http://goa.design
MIT License
140 stars 35 forks source link

minor inconsistencies in generated data-access interfaces #97

Closed xeger closed 8 years ago

xeger commented 8 years ago

Some issues that I found peculiar, which slightly detracted from gorma's awesome usability:

1) List() methods don't return an error (they log it) whereas other methods do

2) Whereas gorm composition methods return a *gorm.DB, gorma data-access objects always want a gorm.DB (and internally store a DB). This requires me to add a lot of extra * when building queries. Granted, there is no performance or safety difference between using DB and *DB; still, it seems like gorma should be consistent with the framework it wraps.

As discussed in #goa @ gophers.slack.com, these both seem worthy of fixing and I hope to whip up a PR sometime soon.