You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by ttlir <il...@gmail.com> on 2018/05/17 17:57:33 UTC
Support for polymorphic SQL Queries
I am using ignite to store different model classes which inherit from the
same interface on a single ignite cache. The problem that I am facing is
with creating polymorphic queries.
Let’s say I have a FinacialSecurity interface with different implementations
Bond, CorporateBond, Swap, GovermentBond …. They all share currency. What I
want to be able to do is to query all financial securities where currency =
“USD”. I wasn’t able to find an example where I could index currency and
filter on it. Is there an easy way to create such queries? If so, is there
an example that I can follow?
Thanks,
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Support for polymorphic SQL Queries
Posted by Igor Sapego <is...@apache.org>.
Have you tried just use QueryEntity, as always?
[1] -
https://apacheignite.readme.io/docs/cache-queries#section-query-configuration-using-queryentity
Best Regards,
Igor
On Tue, May 22, 2018 at 10:50 PM, ttlir <il...@gmail.com> wrote:
> Yes, all models are stored in the same cache.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: Support for polymorphic SQL Queries
Posted by ttlir <il...@gmail.com>.
Yes, all models are stored in the same cache.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Support for polymorphic SQL Queries
Posted by Igor Sapego <is...@apache.org>.
Hi,
Do you store all your models in the same cache?
Best Regards,
Igor
On Thu, May 17, 2018 at 8:57 PM, ttlir <il...@gmail.com> wrote:
> I am using ignite to store different model classes which inherit from the
> same interface on a single ignite cache. The problem that I am facing is
> with creating polymorphic queries.
> Let’s say I have a FinacialSecurity interface with different
> implementations
> Bond, CorporateBond, Swap, GovermentBond …. They all share currency. What I
> want to be able to do is to query all financial securities where currency =
> “USD”. I wasn’t able to find an example where I could index currency and
> filter on it. Is there an easy way to create such queries? If so, is there
> an example that I can follow?
> Thanks,
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>