Ticket filed: http://www.assembla.com/spaces/liftweb/tickets/359 On review board: http://reviewboard.liftweb.net/r/220/
-Ross On Feb 20, 2010, at 3:02 AM, Justin Reardon wrote: > 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 lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.