Exemple #1
0
        /// <inheritdoc/>
        public virtual ICriteria GetTypeExistsCriteria(Type docType)
        {
            Argument.EnsureNotNull("docType", docType);

            // Without any other guidance, we look for the first non-nullable property.
            var prefix    = GetDocumentMappingPrefix(docType);
            var fieldName = GetFieldName(prefix, MappingHelpers.GetSelectionProperty(docType));

            return(new ExistsCriteria(fieldName));
        }