Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Keystone.js 数据库 ODM 中创建字符串数组?我必须创建具有单个字段的新模型并many:true仅与他建立关系吗?
many:true
有一个字段类型:
Things.add({ manyStrings: { type: Types.TextArray } });
数字有一个类似的字段,称为Types.NumberArray。
Types.NumberArray
如果您想要更复杂的东西,最好的办法是创建一个单独的列表并使用该Relationship字段。
Relationship