node-ottoman icon indicating copy to clipboard operation
node-ottoman copied to clipboard

default values of fields in lists are ignored.

Open brett19 opened this issue 10 years ago • 2 comments

When specifying a Schema list, that contains a Group with fields with default values, the default values are never set as the object that is added to the list comes from the user rather than being created by ottoman. Solution may be to have a .push overload on ottoman lists that applies defaults that are missing.

brett19 avatar Jun 02 '15 20:06 brett19

Additional restrictions are going to be placed on the definition and use of list objects within Ottoman Models. This will allow us to enforce the various validations for the list, and as part of this, default values will be applied to schemas which are used inside of lists. The changes primarily include removing the ability to define a list with an implicit schema being used for it contents (since this would not be user-constructible without a reference to the object type), as well as lists being a special form of list managed by ottoman, where pushing to the list will trigger various validations.

brett19 avatar Dec 12 '16 23:12 brett19

any ETA on this?

jakubhomoly avatar Feb 01 '17 19:02 jakubhomoly