Giter VIP home page Giter VIP logo

Comments (7)

daffl avatar daffl commented on June 24, 2024 5

No. It means that $populate is interpreted as a query parameter and not as a special parameter. I should have a fix for this shortly.

from feathers-reactive.

daffl avatar daffl commented on June 24, 2024

Probably very similar to #56 and #53. Non-standard parameters are treated as normal fields, there should be a way to specify fields to exclude when checking a query for reactivity (although I'm surprised it still doesn't work with the always strategy).

from feathers-reactive.

ralph-fuechtenkort avatar ralph-fuechtenkort commented on June 24, 2024

Good Morning, i read that but do not understand what this finally means?
Dies $populate simply not work reactive?

from feathers-reactive.

ngamulin avatar ngamulin commented on June 24, 2024

@daffl , has there been any update related to $populate issue?

I have been trying to populate a query without success.
These are the schemas:

module.exports = function (app) {
  const mongooseClient = app.get('mongooseClient');
  const { Schema } = mongooseClient;
  const channels = new Schema({
    name: String,
    type: String,
    description: String,
    hashtags: [String],
    fbCodeUrl: String,
    parent: {
      type: Schema.Types.ObjectId,
      ref: 'channels'
    },
    children: [{
      type: Schema.Types.ObjectId,
      ref: 'channels'
    }],
    creator: {
      type: Schema.Types.ObjectId,
      ref: 'users'
    },
    admins: [{
      type: Schema.Types.ObjectId,
      ref: 'users'
    }],
    threads: [{
      thread: {
        type: Schema.Types.ObjectId,
        ref: 'threads'
      },
      timeLastActive: { type: Date, default: Date.now }
    }],
    initializationPermissions: {
      customer: Boolean,
      channelAdmin: Boolean
    },
    actionButtons: {
      type: Schema.Types.ObjectId,
      ref: 'fbButtonsSet'
    },
    greeting: String,
    includeActionButtons: {
      type: Boolean,
      default: false
    },
    customers: [{
      type: Number,
      ref: 'customers'
    }]
  });

  return mongooseClient.model('channels', channels);
};

module.exports = function (app) {
  const mongooseClient = app.get('mongooseClient');
  const { Schema } = mongooseClient;
  const users = new Schema({

    email: {type: String, unique: true},
    password: { type: String },
    name: String,

    subordinates: [{
      type: Schema.Types.ObjectId,
      ref: 'users'
    }],


    googleId: { type: String },

    facebookId: { type: String },

    facebook: {
      token: String,
      name: String,
      email: String
    },

    timeJoined: { type: Date, default: Date.now },

    isVerified: { type: Boolean },
    verifyToken: { type: String },
    verifyExpires: { type: Date },
    verifyChanges: { type: Object },
    resetToken: { type: String },
    resetExpires: { type: Date }

  }, {
    timestamps: true
  });

  return mongooseClient.model('users', users);
};

and this is the query which is supposed to populate channel with user:

app.service('channels').find({query: { "$populate": 'creator', _id: [channel_id]}}).then(channelsInfo => {...});

from feathers-reactive.

baljeet avatar baljeet commented on June 24, 2024

Is there any fix to this?

from feathers-reactive.

daffl avatar daffl commented on June 24, 2024

You have to got through the query (https://github.com/feathersjs-ecosystem/feathers-reactive/blob/master/src/strategies.js#L11 and https://github.com/feathersjs-ecosystem/feathers-reactive/blob/master/src/strategies.js#L35) and remove properties that start with $.

from feathers-reactive.

jskrzypek avatar jskrzypek commented on June 24, 2024

@baljeet @ngamulin You can see my issue #82 for an example of how we solved this without a lot of extra code.

from feathers-reactive.

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.