Giter Club home page Giter Club logo

mongoose-find-by-reference's People

Contributors

cheezone avatar crakzor avatar dependabot[bot] avatar rashtell avatar ssbeefeater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mongoose-find-by-reference's Issues

plugin breaks nested query

I love your plugin- this makes live much easier.

But, I do a nested dateQuery which gives no result when using the mongoose-find-by-reference-plugin

dateCondition = {
     "timestamps.createdAt": {
       $gte: startIsoDate,
       $lt: endIsoDate,
     },
   };

when removing the pluging, the query works.

So maybe check the referenced models at the schema and do the plugins magic only when targeting a referenced model...

Issue with multiple criteria for the same referenced collection

Hi, as another stated, thanks for this plugin - it made mongoose development much easier since my database has a TON of reference fields.

That being said, there is one thing I have an issue with:
await Change_Order_Line_Item.find({ Price_Book_Item: { $ne: null }, Change_Order: { $exists: true, Processed: true, }, 'Change_Order.Reference': referenceId, 'Change_Order.Type': 'External', 'Change_Order.Void': false, })

It has to do with queries like this, where I have a key like "Change_Order" that would ideally issue a single query to the referenced collection with the following query:
{ $exists: true, Processed: true, Type: 'External', Void: false, Reference: '123456', }

The problem is that currently, a separate query to the Change_Order collection is called per entry in the object above, and then I basically just return the entire collection. Is there a proper query syntax where this kind of thing would be possible already?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.