How to create complex where clause using MyBatis Generator Example class?

667 Views Asked by At

I want to create a where criteria like this: "A and B and (C or D)". But I don't know how to create it using MyBatis Generator Example class. I can do it when I change the where clause to "(A and B and C) or (A and B and D)", but I think the above one is better. MyBatis Generator document: http://mybatis.org/generator/generatedobjects/exampleClassUsage.html.

1

There are 1 best solutions below

3
StarX On

In Complex Queries part of Mybatis Doc,its example is similar with your problam.