Criteria API is a bit tricky/complicated compared to Query DSL. So, I prefer Query DSL.
Reasons:
- Type safety is the core principle of
Querydsl
and one of the best reasons to prefer it.
- Compact implementation.
- More like JPQL syntax.
Refer to the Query DSL advantages doc for details.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…