Code Monkey home page Code Monkey logo

Comments (4)

matthisk avatar matthisk commented on June 9, 2024

What would your suggestion be on letting this work. Would you define properties to be ignored on your schema, or do you want to define properties to be included. And do you know if Mongoose has API's for this 'hiding' process (I must admit I am not super familiar with the Mongoose API).

from stream-node-orm.

etorrejon avatar etorrejon commented on June 9, 2024

Hi Matthisk, thanks for your response!

The ability to somehow decorate an attribute in a Mongoose schema could be one approach. Perhaps the ability to register a projection or field definition/whitelist for each model that needs to be enriched would also be useful. It may be a bit cumbersome, but I can imagine that this is a common use case.

The only other idea I have is to suggest following a convention of hiding attributes in your schema using the Mongoose select: false option, which is basically what I've done to work around the problem.

from stream-node-orm.

tschellenbach avatar tschellenbach commented on June 9, 2024

it's now possible to overwrite the behaviour (since 1.4.0). so you can disable certain references, or read the data from cache instead of the ORM etc.

from stream-node-orm.

 avatar commented on June 9, 2024

@tschellenbach
Sorry to be opening this thread again. But when you say:

it's now possible to overwrite the behaviour (since 1.4.0). so you can disable certain references, or read the data from cache instead of the ORM etc.

How can I do that? I need to hide plenty of data from the user when I enrich the activity.

Thanks

from stream-node-orm.

Related Issues (20)

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.