This is a migrated thread and some comments may be shown as answers.

InnerJoins

1 Answer 33 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Greg Galipeau
Top achievements
Rank 1
Greg Galipeau asked on 03 Mar 2016, 03:25 PM

Does the Everlive Power Fields (i.e.: expand relationships) have a concept of InnerJoin?

I have a table called Friends. The Friends table has a relationship field called Users. I need to make a query to get the Friends row for a particular User.

I understand the Filtering concept of the expand. But, that still brings back all my Friends and just has a null for Users in the ones that don't meet the filter (i.e.: an OuterJoin). I need it only to return the Friends that match the User.

Here is how I tried it with the expand/filter (this returns 2 rows. 1 with Users and 1 without. i.e.: OuterJoin):

 var friendsTable = app.everlive.data('Friends');

            var expandExp = {
                "User": {
                    "TargetTypeName": "Users",
                    "Filter": {
                        "FBID": selectedFriend.id
                    }
                }
            };

            var filter = new Everlive.Query();
            filter.expand(expandExp);          
            friendsTable.get(filter)

 

 

I've also tried this (but, this returns nothing):

  var friendsTable = app.everlive.data('Friends');
            var filter = new Everlive.Query();
            filter.expand(expandExp);        
            filter.where().eq('User.FBID', selectedFriend.id);
            friendsTable.get(filter)

 

Please let me know if this basic SQL concept is available in Everlive?

 

Thanks,

Greg

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 04 Mar 2016, 11:20 AM
Hello Greg,

I believe that this thread from our forums will be helpful for you - http://www.telerik.com/forums/filter-on-entities-with-relationships because it discusses a similar scenario.

Perhaps you may consider the approaches explained there in regard to the NoSQL schema and capabilities for working with relations.

Please contact us if you need further assistance or information.

Kind regards,
Martin
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
General Discussion
Asked by
Greg Galipeau
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or