Skip to content

How does the dbsession usage work? #6

@sejoharp

Description

@sejoharp

Hello,

this is more a golang-question I think.
You clone the dbsession, defer the dbsession and put it into the env. (

session := application.DBSession.Clone()
defer session.Close()
c.Env["DBSession"] = session
)

As I understand defer, it will close the dbsession, when the method "ApplyDatabase" ends. So, when you fetch the dbsession from env it should be closed.

So, where is my fault?

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions