If you are going to store this stuff in cache like cache.put(myPersonPK, myPerson)
then storing PersonPK inside of Person is bad idea, because PK will be stored twice in cache. I'm not sure I understand your question, but it seems to me that you don't need to do anything here because cache key is always accessible from SQL as _KEY field. Sergi 2017-02-16 13:48 GMT+03:00 zaid <[email protected]>: > Hi, > > My POJO has composite primary key. > > e.g. > > public class Person { > > PersonPK id; > > String name; > > } > > public class PersonPK { > Long id1; > String personType; > } > > These classes are just for example purpose. My question is - can I apply > @SqlQueryField directly on id field in Person class which is of type > PersonPK. How this will be used while creating table in H2? > > > > > > -- > View this message in context: http://apache-ignite-users. > 70518.x6.nabble.com/SqlQueryField-on-composite-primary-key-tp10666.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
