Is it possible to add an index on a property of a transient model?
8 views
Skip to first unread message
Francois Laforge
unread,
Oct 12, 2016, 2:59:19 PM10/12/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to LoopbackJS
I've modified the loopback-example-relations repository and added a unique index in the email-address model such that
"properties": {
"label": {
"type": "string"
},
"address": {
"type": "string",
"index":{
"unique": true
}
}
}
However I am still able to create multiple email addresses for a customer with the same label and address. Do indexes work on embedsMany relations? How can I make the property of an embedded model unique?