You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to take your attention on #189 (comment) , from what I have learn in v1, it is not possible to migrate to v2 without any further notices.
We use a lot of @conditions coupled with XML before mappers in our spring-data-mybatis 1 application and so far, the example does not use before mappers (nor can execute all entities without errors).
I also take your attention on #215 (comment) , with a v2 documentation or v2 migration guide, this will solve #189, is there an estimated time of arrival for v2 documentation ?
Or before mappers completely removed ?
my definition of before mappers: part XML statement for mybatis where statement will be injected after the WHERE condition.
before mapper just marked the mapper files been executed before spring data mybatis automatic generate mappers.
But in v2, it used mybatis starter from mybatis official, so you can define any mapper files if you want, and it will be added to the mybatis context before spring data mybatis, so theoretically, before mappers still can be used in a more reasonable way.
If you want, you can show me some part of your project, and let me see that how to migrate it from V1.
@conditions was marked as @Deprecated, it is not a good(normative) way to condition query. Instead of it, in v2, there's new ways to resolve the probleam.
Querydsl is a framework that enables the construction of statically typed SQL-like queries through its fluent API.
Spring Data Mybatis offer integration with Querydsl through QuerydslPredicateExecutor, as shown in the following example:
To make use of Querydsl support, extend QuerydslPredicateExecutor on your repository interface, as shown in the following example
The preceding example lets you write typesafe queries using Querydsl Predicate instances, as shown in the following example:
How to use?
Add dependencies to you pom.xml
spring-data-mybatis-querydsl
use APT to generate query codeThe text was updated successfully, but these errors were encountered: