We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hi, I tried to use <Collection>.join("CollectionName",....) but it seems that it doesn't work. Only works if I inject the object collection.
<Collection>.join("CollectionName",....)
This works:
TripsPubs.js in server side
import {Trip} from "./Trip"; import {PermissionMiddleware} from "../../middlewares/PermissionMiddleware"; import Permissions from "../../startup/server/Permissions"; import {Vehicle} from "../Vehicle/Vehicle"; const tripsPublication = new PublishEndpoint('trips', function () { Trip.join(Vehicle,"idVehicle","vehicle",["brand"]); let cursor=Trip.find(); console.log("trip: ",cursor.fetch()); return Trip.publishJoinedCursors(cursor,{ reactive: true }, this); }); tripsPublication.use(new PermissionMiddleware([Permissions.TRIPS.LIST]));
ListTrips.vue in client side
meteor: { $subscribe: { trips: [] }, trips() { Trip.join(Vehicle,"idVehicle","vehicle",["brand"]); console.log("Trips: ", Trip.find().fetch()); } }
With collection name doesn't work
import {Trip} from "./Trip"; import {PermissionMiddleware} from "../../middlewares/PermissionMiddleware"; import Permissions from "../../startup/server/Permissions"; const tripsPublication = new PublishEndpoint('trips', function () { Trip.join("vehicles","idVehicle","vehicle",["brand"]); let cursor=Trip.find(); console.log("trip: ",cursor.fetch()); return Trip.publishJoinedCursors(cursor,{ reactive: true }, this); }); tripsPublication.use(new PermissionMiddleware([Permissions.TRIPS.LIST]));
meteor: { $subscribe: { trips: [] }, trips() { Trip.join("vehicles","idVehicle","vehicle",["brand"]); console.log("Trips: ", Trip.find().fetch()); } }
Tested on Meteor 1.10.2 I had to add underscore package using meteor add underscore
meteor add underscore
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I tried to use
<Collection>.join("CollectionName",....)
but it seems that it doesn't work. Only works if I inject the object collection.Summary:
This works:
TripsPubs.js in server side
ListTrips.vue in client side
With collection name doesn't work
TripsPubs.js in server side
ListTrips.vue in client side
Tested on Meteor 1.10.2
I had to add underscore package using
meteor add underscore
The text was updated successfully, but these errors were encountered: