Skip to content

Aggregate match doesn't work with custom date field #6333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JeromeDeLeon opened this issue Jan 11, 2020 · 0 comments
Open

Aggregate match doesn't work with custom date field #6333

JeromeDeLeon opened this issue Jan 11, 2020 · 0 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@JeromeDeLeon
Copy link
Contributor

Issue Description

The problem still persist when doing aggregate with customFieldDate as pointed out by this scenario.

This is my scenario of aggregation. I have tried this one using MongoDB Compass to simulate the results and that works.

[
  {
    group: {
      _id: "$shiftId",
      openedAt: {
        $first: "$shift._created_at"
      }
    }
  },
  {
    match: {
      openedAt: {
        $gte: new Date()
      }
    }
  }
]

Steps to reproduce

Create an aggregation similar to above sample.

Expected Results

Empty array

Actual Outcome

Results filtered by openedAt

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 3.10.0
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
  • Database

    • MongoDB version: 3.4
    • Storage engine: WiredTiger
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

3 participants