Examples on mapAttribute, mapEntity, keyedMapEntity ?

68 views
Skip to first unread message

Albert Kam

unread,
Aug 4, 2017, 5:23:36 AM8/4/17
to cqengine-discuss
Hello again !

Where can i read examples on how to make use of mapAttribute, mapEntity and keyedMapEntity ?
I use dynamic maps, and need to query them a lot.

Currently im just using dynamic attribute provider like portrayed in this previous discussion:

Please guide me.
Thank you !

Chris Kimpton

unread,
Aug 4, 2017, 5:56:21 AM8/4/17
to cqengine-discuss

Albert Kam

unread,
Aug 4, 2017, 6:25:22 AM8/4/17
to cqengine-discuss
Thank you so much for the example,  Mr Kimpton !

Albert Kam

unread,
Aug 4, 2017, 6:52:03 AM8/4/17
to cqengine-discuss
Hello again.

I'm wondering where mapEntityAttribute and keyedMapEntityAttribute is located ?
I'm using cqengine 2.12.1 and i can see only mapAttribute() and mapEntity() within QueryFactory

Thank you !

On Friday, August 4, 2017 at 4:56:21 PM UTC+7, Chris Kimpton wrote:

Chris Kimpton

unread,
Aug 4, 2017, 2:51:09 PM8/4/17
to cqengine-discuss
Good question - they were in the QueryFactory, but seems it got renamed to primaryKeyedEntity in this change - https://github.com/npgall/cqengine/commit/5931fe64ffaabd9305b30733fb2e4fe17b30854a

Not sure what you should use now.  :( 

Albert Kam

unread,
Aug 6, 2017, 12:37:34 AM8/6/17
to cqengine-discuss
Thank you for the reply..

It seems that mapEntity() and primaryKeyedMapEntity() now returns Map instance, so it makes sense that we only use mapAttribute() that works on Map instance.

So my assumption is that mapAttribute() is now usable for normal map, entity map, and also keyed entity map.
Reply all
Reply to author
Forward
0 new messages