ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolai Tikhonov <ntikho...@apache.org>
Subject Re: Create and query a binary cache in ignite
Date Mon, 31 Jul 2017 13:27:16 GMT
Hi James,

Could you share your code as simple maven project? It would be great and
allows to us help you quickly.

On Mon, Jul 31, 2017 at 9:43 AM, James Isaac <jamesisaactm@gmail.com> wrote:

>
> Hi,
>
> I am trying to use BinaryObjects to create the cache at runtime. For
> example, instead of writing a pojo class such as Employee and configuring
> it as a cache value type, I need to be able to dynamically configure the
> cache with the field names and field types for the particular cache.
>
> I have posted the sample code on stackoverflow: https://stackov
> erflow.com/questions/45371054/create-and-query-a-binary-cache-in-ignite
> (Posting the code here would be messy)
>
> I am trying to configure the cache with the employeeId (Integer) as key
> and the whole employee record (BinaryObject) as value. When I run the above
> class, I get the following exception :
>
> Caused by: org.h2.jdbc.JdbcSQLException: Table "EMPLOYEE" not found; SQL statement:
> select * from "emplCache".Employee where salary > 500 limit 5
>
> What am I doing wrong here? Is there anything more other than this line:
>
> employeeEntity.setTableName("Employee");
>
> I checked out https://github.com/apache/ignite/blob/master/examples/sr
> c/main/java/org/apache/ignite/examples/datagrid/CacheQueryDdlExample.java
>
> as Nikolay suggested but I see that they are setting the pojo class as the
> indexed type. Is there any way I can avoid this?
>
> Regards,
>
> James
>
>

Mime
View raw message