ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Mashenkov <amashen...@gridgain.com>
Subject Re: pure memory SQL Grid
Date Wed, 08 Feb 2017 09:21:05 GMT
Hi Lighfer,

You can use UserRes object as a key and as a value at same time, but do not
forget to override hashcode() and equals() methods.

On Wed, Feb 8, 2017 at 11:57 AM, Lighfer <lighfer@gmail.com> wrote:

> thanks for your reply.
>
> Now it works, but there is a new problem, it looks like every table must
> has
> a _key field, how to deal with middle table?
>
> example:
> class User {
>     @QuerySqlField(index = true)
>     Integer userId;
>     ...
> }
>
> class Res {
>     @QuerySqlField(index = true)
>     Integer resId;
>     ...
> }
>
> class UserRes {
>     @QuerySqlField(index = true)
>     Integer userId;
>     @QuerySqlField(index = true)
>     Integer resId;
>     ...
> }
>
> The UserRes class has no field can be used as _key.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/pure-memory-SQL-Grid-tp10464p10501.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message