Hello!
I can see the following example:
@Query("SELECT _key, secondName FROM Person WHERE firstName REGEXP ?")
public List<List> selectSeveralField(String val, Pageable pageable);
It seems that id you are ready to get a list of lists of raw column values, you can have multiple column query. You can also use JDBC, for sure:
https://apacheignite-sql.readme.io/docs/jdbc-driverGranted,
------------------------------
Ilya Kasnacheev
Community Support Specialist
GridGain
------------------------------
Original Message:
Sent: 09-26-2020 05:38 PM
From: Qiaoqiao Sun
Subject: SpringData API problem or bug?
Hello! thanks for your reply!
I also want to consult you the following two questions:
1. Regarding cross-table query, if I want to return a few specific fields (partial fields), is there any query method that the SpringData API can support?
2. Can I only use JDBC to complete SQL cross-table query in Ignite? If SpringData API is not available, is there any other query method such as MyBatis or Hibernate that can be used?
Best regards ,
------------------------------
Qiaoqiao Sun
office staff
ASUS Technology
Original Message:
Sent: 09-23-2020 01:34 AM
From: Ilya Kasnacheev
Subject: SpringData API problem or bug?
Hello!
Extending Spring Data support is not on our current roadmap.
Regards,
------------------------------
Ilya Kasnacheev
Community Support Specialist
GridGain
Original Message:
Sent: 09-23-2020 12:29 AM
From: Qiaoqiao Sun
Subject: SpringData API problem or bug?
Hello, thanks for your reply!
I would also like to ask if you have a plan to enhance this feature(GridGain Spring Data support has two modes: it can either load a complete entity, or a single column.). This feature will restrict the use of SpringData API, and the function of checking only some fields cannot be realized.
Best regards ,
------------------------------
Qiaoqiao Sun
office staff
ASUS Technology
Original Message:
Sent: 09-21-2020 01:41 AM
From: Ilya Kasnacheev
Subject: SpringData API problem or bug?
Hello!
As far as my understanding goes, GridGain Spring Data support has two modes: it can either load a complete entity, or a single column. It is not sophisticated enough to build an (incomplete?) entity from a (sub)set of columns, and in your case, it's not obvious where b.b1 and b.b2 should go.
I recommend using Spring Data in these modes, which are supported and tested.
Regards,
------------------------------
Ilya Kasnacheev
Community Support Specialist
GridGain
Original Message:
Sent: 09-21-2020 12:45 AM
From: Qiaoqiao Sun
Subject: SpringData API problem or bug?
Hi All,
I am trying to use SpringData API of gridgain community edition. When I do a cross table query using the Ignite spring data module, the returned result data only contains the first field of each query record. Here is a code example:
@Query(select a.a0, a.a1, b.b1, b.b2 from TableA as a ,TableB as b where a2=b2)
public List<ObjectA> findData();
The running result of above code is that only the a.a0 column was returned. And the result is the same (only first column is returned) when I try to query selected columns from one table or several tables. I researched the code and find that it seems only the first column is written to the object even I query more columns. And it works well if I use "select *"to query all columns. I got the same result of using Apache Ignite or GridGain. I am wondering if SpringData API of Ignite/gridgain is a stable function that can be used. Is this a bug ? How should I use SpringData?
Thanks!
------------------------------
Qiaoqiao Sun
office staff
ASUS Technology
------------------------------