loopback-multi-emails-and-phones-mixin
v1.1.5
Published
A mixin to enable including Through model properties
Downloads
31
Maintainers
Readme
loopback-multi-emails-and-phones-mixin (WIP)
##Features
- multiple emails
- multiple phones
##Installation
npm install loopback-multi-emails-and-phones-mixin --save
##How to use
Add the mixins property to your server/model-config.json like the following:
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"../node_modules/loopback-multi-emails-and-phones-mixin",
"../common/mixins"
]
}
}
To use with your Models add the mixins attribute to the definition object of your model config.
{
"name": "user",
"base": "User",
"properties": {
"name": {
"type": "string",
}
},
"mixins": {
"MultiEmailsAndPhones": true
}
}
LIMITATIONS
- Currently only working with memory and mongodb connectors. Filter on level 2 properties
TODO
- Fix pending tests