Hi, In JSONMetaRecord, the method needAllJSONFields, has documentation claiming it is false by default, where it is in fact true by default. It does seem safest to have this on to avoid pulling in corrupt documents. However, the current usage of needAllJSONFields does not work with optional fields when set to true.
Presently when I create a document with optional fields, leave them empty, and save, I cannot retrieve the document, because needAllJSONFields requires those optional fields to be present when reconstructing the document. Being able to save a document I cannot retrieve seems rather counterintuitive. While I could just set needAllJSONFields = false, doing so will prevent checking for the presence of required fields. I think the best thing to do is change the fromJValue code so that optional fields are never included in the recordFieldsNotInJson set. This way needAllJSONFields can be left true while allowing the user to use optional fields. Thanks, Justin Reardon -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
