You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by devis76 <de...@flexvalley.com> on 2016/11/08 15:36:41 UTC
SQLQuery
Hi,
can you help me how to perform this query with Ignite SQL.
I have this class
class ClientUpdate
{
private final String registrationId;
private final LinkObject[] objectLinks;
}
class LinkObject implements Serializable{
private final Integer objectId;
private final Integer objectInstanceId;
private final Integer resourceId;
}
I can't use join because LinkObject has no ref with ClientUpdate.
I need to create query "Slect all ClientUpdates" where linkObject.objectId=?
and resourceId=?
Thank you in advance
Devis
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQLQuery-tp8785.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: SQLQuery
Posted by vkulichenko <va...@gmail.com>.
Devis,
Having a link from one object to another is the only way to join them. You
need to add a 'clientUpdateId' field to LinkObject, store each LinkObject as
a separate entry and then join. Another way is to denormalize and add
'registrationId' to LinkObject and remove ClientUpdate type. This way you
can simply query LinkObject-s without a join.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQLQuery-tp8785p8791.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: SQLQuery
Posted by devis76 <de...@flexvalley.com>.
Hi,
thank you very much
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SQLQuery-tp8785p8830.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.