Closed rmrio closed 9 years ago
modl relies on sqlx for a lot of underlying database work (including serialization), and its sqlx.DB is nil in your example. It's for this reason the modl.NewDbMap
function is provided. Try instead:
dbmap := modl.NewDbMap(db, modl.PostgresDialect{})
This will initialize the name mapper as well as the dbx handle.
Thank you for the explanation and for the library
The following simple insert code fails with modl, but ok with gorp.
Tested on go1.4 + postgres 9.4 The output:
I'm not sure I can solve this problem, but I'll try