code: function getRequiredPropertiesForEntityType(type) {
              if (type.custom && type.custom.required) {
                  return type.custom.required;
              }
  
              // Don't yet know the required properties for this type
              // Find out now
              if (!type.custom) {
                  type.custom = {};
              }
              var required = {};
              type.custom.required = required;
              var props = type.getProperties();
              var childProps = getComplexChildProperties(props);
              props = props.concat(childProps);            
              props.forEach(function (prop) {
                  var vals = prop.validators;
                  for (var i = vals.length; i--;) {
                      var val = vals[i];
                      // Todo: add the 'isRequired' property to breeze.Validator.required validator
                      if (val.context.isRequired || val.name === 'required') {
                          required[prop.name] = true;
                          break;
                      }
                  }
              });
              return required;
          }
docs: /*
  getRequiredPropertiesForEntityType
  Returns a hash of property names of properties that are required.
  Creates that hash lazily and adds it to the
  entityType's metadata for easier access by this directive