Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4831

filterBy using a hasMany relationship

$
0
0

@ewaschenko wrote:

Hi,

My chatroom model includes a hasMany comments and my user model also includes hasMany comments.

With my chatroom model I'm trying to find my comments for the chatroom. using:

var mySelf = this;
return this.chatroomModel.get('comments').then((myComments) => {
     var commentList = myComments.filterBy('user', mySelf.get('user').get('currentUser'));
     console.log("Array: ", commentList );
});

If I filter by any comment property it works but filtering by user does not. Any ideas as to why?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4831

Trending Articles