Skip to content

question : how to reuse where clauses ? #150

Closed
@cooljeffrey

Description

@cooljeffrey

Hello mate, thanks for this awesome lib!

I got a question trying to reuse some complex where clause between mapper.selectMany and mapepr.countByExample. With the example classes generated against runtime MyBatis3, I could reuse a built up example instance between select and count, how can I do this with runtime MyBatis3DynamicSQL ?

The purpose to reuse the where clauses is that in some situations we need to return a total count for the records matching the criteria, then do another select to return a paginated result set by setting additional offset and limit.

Looking forward to your reply, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions