Add an execution profile argument to DAO factory methods

Description

Currently the mapper does not provide an easy way to switch the execution profile for a whole DAO. With statement attributes a profile can be specified:

  • either through the annotation but it's hard-coded,

  • or through the method parameter but you have to add it to every method signature, and then pass it every time you call those methods.

It would be nice to introduce a new parameter annotation for DAO factory methods:

The profile name would get added to every statement generated by the DAO (unless it's overridden with statement attributes as explained above), and also exposed internally via a new method MapperContext.getExecutionProfileName().

Environment

None

Pull Requests

None

Assignee

Greg Bestland

Reporter

Olivier Michallat

Labels

None

PM Priority

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Minor
Configure