Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create the array of strings in Keystone.js Database ODM?

How can I create the array of strings in Keystone.js Database ODM? I have to create new model with single field and make a many:true relationship with him only?

like image 757
Tolsi Avatar asked Mar 20 '14 13:03

Tolsi


1 Answers

There is a field type for this:

Things.add({
  manyStrings: { type: Types.TextArray }
});

There is a similar field for numbers called Types.NumberArray.

If you want something more sophisticated, your best bet is creating a separate List and using the Relationship field.

like image 174
Jed Watson Avatar answered Nov 12 '22 12:11

Jed Watson