Vincent Tung

Results 7 comments of Vincent Tung

就是實際使用上提供給使用者自行決定這個查詢要不要做distinct(要做distinct就會合併有輸出的欄位, 不做distinct就會得到完整的查詢筆數資料), 算是我自己應用上的一個特殊需求, 謝謝.

> 那自定义 `SqlResolver` 组件,就能实现你的需求了 好, 我試試, 謝謝

您好, 我還是不知道要從何下手, 我如果有多個entity都要從前端來決定這個查詢是要去重或不要去重, 應該要怎麼做, 我目前是同樣的entity建立兩個, 其中一個在SearchBean有啟用distinct=true的方式來處理. 謝謝.

学生成绩的实体类如下: @SearchBean(tables="course") public class Course { @DbField("id") private Integer id; @DbField("name") private String name; @DbField("age") private Short age; @DbField("course") private String course; @DbField("score") private Short score; } 资料如下: [ {id:...

我的application.yml ``` mybatis-flex: datasource: ds1: driver-class-name: com.informix.jdbc.IfxDriver # type: druid password: 0000 url: jdbc:informix-sqli://192.168.1.1:11540/gfcdb:INFORMIXSERVER=utauyan;DB_DATE=mdy4/;DB_LOCALE=zh_tw.utf8; username: root ds2: driver-class-name: com.informix.jdbc.IfxDriver # type: druid password: 0000 url: jdbc:informix-sqli://192.168.1.2:11540/gfcdb:INFORMIXSERVER=utest;DB_DATE=mdy4/;DB_LOCALE=zh_tw.utf8; username: root ``` ![Snipaste_2023-10-11_10-38-10](https://github.com/mybatis-flex/mybatis-flex/assets/8263387/e128bbef-2326-4a6d-a907-e6ecc7625683)...

另一個問題則是一旦數據庫判定成南大數據庫, 所產生的SQL statement的column與table會被反上引號括起來, 這在informix數據庫是無效的字元. ![Snipaste_2023-10-11_11-16-49](https://github.com/mybatis-flex/mybatis-flex/assets/8263387/c4a472e7-8649-42e2-bc94-0aa6ee41a7dc)

我試著在test代碼時,再抓一次, 發現mybatis-flex辨認的也不是mysql, 而是GBASE_8S(南大通用數據庫) 執行MybatisFlexConfiguration時, 是預設的mysql ![Snipaste_2023-10-09_19-05-45](https://github.com/mybatis-flex/mybatis-flex/assets/8263387/52950efc-33a4-43b7-858e-093c125fb31c) 到了調試mapper.selectAll()之前,再改一次,發現數據庫是被辨識為GBASE_8S ![Snipaste_2023-10-09_19-04-10](https://github.com/mybatis-flex/mybatis-flex/assets/8263387/2860ddc9-0ebb-41ad-83fa-b24fe14b3344)