You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Alexander Ivanov <rs...@list.ru> on 2017/07/05 21:02:16 UTC
Mix in cache keys objects with different types.
Hello!
IgniteCache<Serializable, BinaryObject> cache = ...;
You can't have both objects with keys of type Long and String. Why?
Alexander.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Mix-in-cache-keys-objects-with-different-types-tp14354.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Mix in cache keys objects with different types.
Posted by vkulichenko <va...@gmail.com>.
Alexander,
It doesn't matter if you use SQL. Without SQL it should work though. Did you
get any exception when you tried this?
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Mix-in-cache-keys-objects-with-different-types-tp14354p14426.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Mix in cache keys objects with different types.
Posted by Alexander Ivanov <rs...@list.ru>.
Ok. Serializable is not so good example. Conversion to bytes sequence and its
comparation is not effective and unambiguous. But what about Number as super
type?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Mix-in-cache-keys-objects-with-different-types-tp14354p14374.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Mix in cache keys objects with different types.
Posted by vkulichenko <va...@gmail.com>.
Hi Alexander,
Having a separate cache per data type always was recommended, as it provides
better isolation of data sets from each other, and therefore less error
prone. In 2.0 this became a requirement due to architectural changes and
leaning towards SQL database.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Mix-in-cache-keys-objects-with-different-types-tp14354p14358.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.