Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
1

Template-based reads and nested properties

The API that allows for searching the space seems to be very limiting when the object hierarchy begins to grow deeper. Assume an Employee class that has a property name "homeAddress" of type Address. How would you create a tuple that can search for all Employees who live in the 43082 zip code?

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2526]{quote}

asked 2008-08-08 20:53:46 -0500

oravecz gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

See: /[/question/5682/searching-for-an-element-of-a-collection/]&tstart=30

Shay

answered 2008-08-09 17:23:00 -0500

shay hassidim gravatar image
edit flag offensive delete link more
0

Thanks Shay. I had read the Parent-Child document before. I guess I was just hoping that an alternative approach exists when your parent/child relationship is a simple value object.

What if my property is not an object with sub-properties, but rather an array. For example, if I want to search for all blogs with the tag "gigaspaces":

class BlogEntry {
    public String tags;
    ...
}

Based on what I read, is it true that I should construct a Tag class and it would have to have a relationship to the BlogEntry that it belongs to?

answered 2008-08-09 21:56:37 -0500

oravecz gravatar image
edit flag offensive delete link more

Comments

The other option would be to use the approach described here: http://www.gigaspaces.com/wiki/displa...

Shay

shay hassidim gravatar image shay hassidim  ( 2008-08-10 07:54:22 -0500 )edit

looks like the page is removed. Could you tell me what is the other option when I have an array Object in the class ?

avaneeshbm gravatar image avaneeshbm  ( 2011-10-16 07:04:58 -0500 )edit

You may query (and index) today Collections , Maps and Arrays. See:
http://www.gigaspaces.com/wiki/display/XAP8/SQLQuery
http://www.gigaspaces.com/wiki/display/XAP8/Indexing

Shay

shay hassidim gravatar image shay hassidim  ( 2011-10-16 07:12:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2008-08-08 20:53:46 -0500

Seen: 110 times

Last updated: Aug 09 '08