Filter on a field named type

I have a document model with a field with the name type, for example:

    plan: {
      type: { type: String, enum: ['regular', 'advantage'], default: 'advantage' },
      upgrade_date: { type: Date, default: },
      upgrade_path: { type: String, default: 'advantage-for-all-1' },
      downgrade_date: { type: Date },

Expected behavior

Expect to be able to filter on plan with the subfield ‘type’

Actual behavior

Type does not show up in the list of subfields that you are allowed to filter on (after selecting plan). The other 3 fields do show up as valid subfields in the filter. All fields show up correctly in the details view of the record.

Failure Logs

Please include any relevant log snippets, if necessary.


Please provide any relevant information about your setup.

  • Package Version: 6
  • Express Version:
  • Sequelize Version:
  • Database Dialect: Mongo
  • Database Version:
  • Project Name:

Hi @Liam_Cheung,

I’ll try to reproduce your issue today and let you know if I observe the same problem.

I reproduced your issue @Liam_Cheung.

My guess is that it was a feature we’ve never implemented before (filter on enum type subfields).
I should have a Pull Request ready for review tonight.

Thanks for your patience.

Great thanks! I will test it as soon as there is a branch to reference.

The patch is now live.
You just have to refresh your browser page to enjoy it.

Thanks alot, tested and working fine.