Alexis Lauthier
unread,Oct 26, 2011, 10:27:31 AM10/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Hazelcast
Hi,
I'm trying to get several entries by key in a map, using a
PredicateBuilder. The following code :
IMap<Integer, Integer> map = Hazelcast.getMap("test");
map.put(1, 11);
map.put(2, 22);
map.put(3, 33);
PredicateBuilder predicate = new
PredicateBuilder().getEntryObject().key().in(1, 2);
System.out.println(predicate);
for (Entry<Integer, Integer> e : map.entrySet(predicate)) {
System.out.println(e.getKey());
}
prints :
QueryBuilder{
com.hazelcast.query.EntryKeyObject@f1b6fa6 IN (1,2)
}
3
1
2
I don't understand why I'm getting the "3" entry, since I'm only
requesting "1" and "2". Am I using the predicate incorrectly, or is it
a bug ?