0
자신의 하위 모델을 포함 할 수있는 모델을 연결하는 방법이 있습니까?waterline.js 동일한 모델 자체의 하위 모델을 가질 수있는 모델을 연결하는 방법은 무엇입니까?
{
identity: 'component',
connection: 'default',
attributes: {
id: {
type: 'string',
unique: true,
primaryKey: true,
required: true
},
name: 'string',
from_device: {
model: 'device',
via: 'id'
},
dataItems: {
collection: 'dataitem'
},
subComponents:{
collection: 'component',
via: 'id',
// through: 'componentsubcomponent'
}
}
}