Skip to content

How to execute raw MongoDB queries #2807

@sureshkodur

Description

@sureshkodur

Description / Steps to reproduce / Feature proposal

How to use raw queries like aggregation on mongodb. Is there any solution ?

Current Behavior

Expected Behavior

I want to use raw queries or other models. For example, Customer model, and Products model. I need to write aggregate query like

db.LoanRequestMappings.aggregate([
    {
        $lookup:{
            .....   
        }
    },
    {   $unwind:"$data" },
    {
        $match:{
            ...
        }
    },
    {
        $lookup:{
            ... 
        }
    },
    {   $unwind:"$LoanRepayment" },
    { $project : { _id: 0} },
    { $out : "tempData" }
])

on product model while getting customer model.

Please help.

See Reporting Issues for more tips on writing good issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    RepositoryIssues related to @loopback/repository packagespike

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions