【发布时间】:2017-11-20 07:00:19
【问题描述】:
是否可以制作或构建本身包含模型的模型? 我建造了类似休耕的东西,但不是我真正想要的。我知道如何在 SQL 数据库或 noSQL 中详细说明它。
{
"name": "test",
"plural": "tests",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"name": {
"type": "string"
},
"fam": {
"type": "string",
"required": true
},
"description": {
"type": "string"
},
"tests":{
"testname":{
"type": "string"
},
"score":{
"type": "string"
}
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}
但在explorer 中显示为POST 或GET 数据:
{
"name": "string",
"fam": "string",
"description": "string",
"tests": {},
"id": "string"
}
【问题讨论】:
-
为什么你认为这是个好主意?
-
我不知道这是好是坏,我想试试。
标签: mongodb nosql loopbackjs loopback