shuikan95 commented on issue #24913:
URL:
https://github.com/apache/shardingsphere/issues/24913#issuecomment-1493226926
@strongduanmu @insist777
Some other tests give me different results.
> Will to choose read datasource
```html
org.springframework.data.jpa.repository.Query;
@Query(value = "select a.money,a.user_id from account_tbl a", nativeQuery =
true)
List<Map<String, Object>> findSome1();
@Query(value = "select new map(a.money as money,a.userId as userId) from
Account a")
List<Map<String, Object>> findSome2();
JPA with QueryDSL
com.querydsl.jpa.impl.JPAQueryFactory
QAccount qAccount = QAccount.account;
List<Map<Expression<?>, ?>> fetch = jpaQueryFactory
.select(Projections.map(qAccount))
.from(qAccount)
.orderBy(qAccount.id.desc())
.fetch();
org.springframework.data.jpa.repository.JpaRepository#getById // Need to
set spring.jpa.open-in-view=true
```
> Will to choose write datasource
```html
org.springframework.data.repository.CrudRepository#findById
org.springframework.data.jpa.repository.JpaRepository#findAll
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]