Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4543

Collection type doesn't support circular references

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: TypeScript

      What problem are you facing?

      I have an interface with a property that circularly references itself, which is correct and cannot be changed due to how my system works. When I use this interface or another one that depends on it to assign it to a collection I get 3 errors that look like the following:

      What driver and relevant dependency versions are you using?

      Driver version 4.8.1 on Node.js 18.7.0 and TypeScript 4.7.4

      Steps to reproduce?

      1. Create an interface with a property that references itself
      2. Assign that interface to a collection through `db.collection<YourInterface>`()

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            rodrigoleitao25@gmail.com Rodrigo Leitão
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: