问题描述
我有看起来像这样的环回模型:
Model A
{
Properties
{
"name": {
"type": "string","length": 255
},"B_ids": [
"string"
]
}
}
-------------------------------------------------------------------------------------------------------
Model B
{
Properties
{
"name": {
"type": "string","id": {
"type": "string","id": true,"required": true,"defaultFn": "uuidv4","postgresql": {
"dataType": "uuid"
}
}
}
}
在这里,我需要验证请求的B_ids数组数据。像数组中的所有项目一样,应该是UUID,例如
{"name":"Jone","B_ids":["5a555db7-cc68-4e0d-8db5-f2cecbd63e6b","7i894db7-0c68-4o0d-t6b5-f2cecbd6u569v"]
}
,并且每个项目都必须出现在#Model B的表格中。 我已经花了很多时间来寻找解决方案,但对我却不起作用。请帮助我了解如何在Loopback中做到这一点。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)