apache ignite Id return null

classic Classic list List threaded Threaded
4 messages Options
hulitao198758 hulitao198758
Reply | Threaded
Open this post in threaded view
|

apache ignite Id return null

This post was updated on .
    Hello, the project is on my side to Ignite + mysql + springboot build
platform, mysql do persistent storage, Save in the client program through
the program records at the time of the query can return to normal content
ID, but the client via JDBC Insert Into to Cache the data at the time of the
query, the other fields can return to normal, ID returns Null, why?



 For example: mysql has two fields create table testa (id bigint not null, name varchar (20), primary key (id)) and in Ignite corresponding entity class private Long id; private String name; When using springboot to start The client creates an entity class object using the object's Set method to copy the ID field to the object. SetID (11L); Object. SetName ("hello"); Then call the IgniteRepository Save method to save the value of the object to the Cache, call IgniteRepository FindOne method in the query ID can see the contents of the ID, but by connecting the JDBC client insert into CacheName (id, name) values (12, 'hello') After inserting data in the FindOne method called IgniteRepository, Name field can be seen To content but ID returns NULL


--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Andrew Mashenkov Andrew Mashenkov
Reply | Threaded
Open this post in threaded view
|

Re: apache ignite Id return null

Hi,

Sorry. I understand almost nothing.
Would you please clarify what "ID" and "normal content" do you mean?
Would you please share a code with comments in places where you've got unexpected results?

On Tue, Mar 27, 2018 at 10:31 AM, hulitao198758 <[hidden email]> wrote:
    Hello, the project is on my side to Ignite + mysql + springboot build
platform, mysql do persistent storage, Save in the client program through
the program records at the time of the query can return to normal content
ID, but the client via JDBC Insert Into to Cache the data at the time of the
query, the other fields can return to normal, ID returns Null, why?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/



--
Best regards,
Andrey V. Mashenkov
Regards,
Andrew.
hulitao198758 hulitao198758
Reply | Threaded
Open this post in threaded view
|

Re: apache ignite Id return null

 For example: mysql has two fields create table testa (id bigint not null,
name varchar (20), primary key (id)) and in Ignite corresponding entity
class private Long id; private String name; When using springboot to start
The client creates an entity class object using the object's Set method to
copy the ID field to the object. SetID (11L); Object. SetName ("hello");
Then call the IgniteRepository Save method to save the value of the object
to the Cache, call IgniteRepository FindOne method in the query ID can see
the contents of the ID, but by connecting the JDBC client insert into
CacheName (id, name) values (12, 'hello') After inserting data in the
FindOne method called IgniteRepository, Name field can be seen To content
but ID returns NULL



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Andrew Mashenkov Andrew Mashenkov
Reply | Threaded
Open this post in threaded view
|

Re: apache ignite Id return null

Can you share a reproducer?

On Tue, Mar 27, 2018 at 12:49 PM, hulitao198758 <[hidden email]> wrote:
 For example: mysql has two fields create table testa (id bigint not null,
name varchar (20), primary key (id)) and in Ignite corresponding entity
class private Long id; private String name; When using springboot to start
The client creates an entity class object using the object's Set method to
copy the ID field to the object. SetID (11L); Object. SetName ("hello");
Then call the IgniteRepository Save method to save the value of the object
to the Cache, call IgniteRepository FindOne method in the query ID can see
the contents of the ID, but by connecting the JDBC client insert into
CacheName (id, name) values (12, 'hello') After inserting data in the
FindOne method called IgniteRepository, Name field can be seen To content
but ID returns NULL



--
Best regards,
Andrey V. Mashenkov
Regards,
Andrew.