Question: I'm very new in mongoose and node js. I get some troubles in my project. 
here is my user model

```
UserSchema = new Schema({
account:String,
password:String,
display_name:String )}

```

and friends model

```
FriendSchema = new Schema({

friend_from_id:{
    type:Schema.ObjectId,
    ref:'users'
},
friend_to_id:{
    type:Schema.ObjectId,
    ref:'users'
}});

```

and user\_status model

```
UserStatusSchema = new Schema({

user_id:{
    type:Schema.ObjectId,
    ref:'users'
},
status:{
    type:Boolean
},
status_text:String,
last_updated_at:String});

```

how can I populate or any way to make a result from friend model like this

```
{
"_id": "55145b6b8b9c9e6c1f739441",
"friend_to_id": {
    "_id": "5502976dbef9fa180d28ea21",
    "display_name": "Jason",
    "account": "xxx@ginmed.com",
    "status":false,
    "status::"how it's going"
},
"friend_from_id": {
    "_id": "5502976dbef9fa180d28ea21",
    "display_name": "SonPham",
    "account": "yyy@ginmed.com",
    "status":true,
    "status::"how to do it"}

```

this mean I want to combine both user\_status and user model in a field of friend model

Answer: 
You can create one predicate without Expression.Or:

```
public static IQueryable<T> MyFilter<T>(this IQueryable<T> queryable) where T : class ,IModel
    {
        var someIds = new int[] { 1, 2, 3, 4, 5 };
        var userId = 2;

        var result = queryable
            .Where(e => someIds.Contains(e.Id) || e.UserId == userId || e.CreatedDate != null);

        return result;
    }

```
Use `PredicateBuilder`
----------------------

Either copy the source of the class from [here](http://www.albahari.com/nutshell/predicatebuilder.aspx), or install the [LINQKit NuGet package](https://www.nuget.org/packages/LinqKit/) (which has a dependency on Entity Framework), to get the `PredicateBuilder` class. It's simple to dynamically chain expression together with it:

```
var predicate = PredicateBuilder.False<int>();
predicate = predicate.Or(x => x > 5);
predicate = predicate.Or(x => x % 2 == 0);
predicate = predicate.Or(x => x == 42 );

var queryable = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }.AsQueryable();
var result = queryable.Where(predicate);

```