Skip to content

Can a getter be used in a query condition? #10914

Answered by vkarpov15
vineetdigit asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately not. Since virtuals aren't stored in MongoDB, you can't use virtuals in query filters.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vineetdigit
Comment options

Answer selected by vineetdigit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants