Yes, all of them defined in Person
On 2/11/2020 6:29 PM, Evgenii Zhuravlev wrote:
Did you add it to all fields in both key and value?
Evgenii
вт, 11 февр. 2020 г. в 15:18, Edward Chen <[email protected]
<mailto:[email protected]>>:
I just add @QuerySqlField to java field.
Does Ignite have annotation for Primary Key ?
Evgenii
вт, 11 февр. 2020 г. в 13:59, Edward Chen <[email protected]
<mailto:[email protected]>>:
Hello,
I am using Ignite 2.7.6 and testing its SQL insert function.
I have these codes:
PersonKey {
id: Long;
type: String;
// constructor, getter, setter ....
// hashCode, toString ...
}
Person {
id: Long;
type: String;
name: String;
zip: String;
public PersonKey getKey() {return new PersonKey(...);}
// constructor, getter, setter ....
// hashCode, toString ...
}
insert sql: "insert into Person(id, type, name, zip) values
(100, "S", "John", "11223")
when get data back from Cache,
Iterator<..> iter = cache.iterator();
while(iter.hasNext()){
Cache.Entry<PersonKey, Person> entry = iter.next();
entry.getKey --> *0,null *
}
The last output is not correct, it should be *"100, S"* .
Any inputs please ?
Thanks