simple-schema


Cannot find attachSchema property on Mongo.Collection with angular2-meteor


Here is my problem :
I want to use the power of simple-schema to be able to check my inserts against the following schema :
let UprocSchema = new SimpleSchema({
"name": { type : String, label: "Nom Uproc" },
"label": { type : String, label: "Libellé Uproc" },
"status": { type : String, label: "Status UPR" }
});
For some reason I ignore, even if the SimpleSchema seems to be well instanciated, I cannot use the attachSchema property on Mongo.Collection.
Here is my code :
let repo_collection = new Mongo.Collection('repository');
export const Repository = new MongoObservable.Collection<Uproc>('repo_collection');
repo_collection.attachSchema( UprocSchema );
Here is my error messages :
Property 'attachSchema' does not exist on type 'Collection<{}>'.
TypeError: repo_collection.attachSchema is not a function
attachSchema is part of [collection2][1] package.
Documentation states:
Create one or more SimpleSchema instances and then use them to
validate objects. By adding the aldeed:collection2 package to your
app, you can attach them to collections to get automatic validation of
your insert and update operations.

Related Links

Cannot find attachSchema property on Mongo.Collection with angular2-meteor

Categories

HOME
keyboard
verification
shinyapps
facebook-messenger
barcode-scanner
windows-10
website
biztalk
celery
tabs
moodle-api
amp
swift2
hyperledger
supercollider
mithril.js
wine
clickable-image
fasm
phpstorm-2017.1
documentum
sql-injection
corona
twisted
synthesis
pywinauto
uima
checkout
nullreferenceexception
cmake-gui
hdl
substring
ini
pdf.js
firemonkey-style
react-dnd
nurbs
jpa-2.1
hdmi
jackrabbit-oak
monitor
autodesk-model-derivative
riotjs
xcrun
gsp
listjs
transform
forms-authentication
mv
telephonymanager
gitolite
python-jira
doctrine-extensions
docker-ucp
jenkins-slave
adblock
directwrite
solr-query-syntax
sequence-diagram
htmlspecialchars
google-news
connect-direct
gawk
xcode6.4
thread-exceptions
always-on-top
piping
fiber
highlighting
adjacency-list
ibm-was
highest
knife
dynamics-ax-2012-r2
kefir.js
findersync
google-hangouts
operands
rubber
inequality
lumia-imaging-sdk
hyperloglog
application-blocks
compiler-flags
visual-c++-2005
discovery
disjoint-union
ldif
unicoins
audiotoolbox
server-name
struts2-s2hibernate
java.lang.class
litespeed
delphi-prism
fork-join
kernel32
downgrade
eaccelerator
ccl
j2mepolish
facebook-fbml
subtext
version-control-migration
datagridcolumn
remote-working
synthesizer

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App