Dear All; I want to map a stored procedure with fluent nhibernate. My stored procedure return a result set from a temp table.
Map : public class RequisitionFlowReportMap : ClassMap<RequisitionFlowReport> { public RequisitionFlowReportMap() { StoredProcedure("SOS_SP_REQUISITIONFLOWREPORT", ""); ReadOnly(); Cache.ReadOnly(); Id(x => x.ID, "ID").GeneratedBy.Assigned(); Map(x => x.RequisitionLineId, "RequisitionLineId"); Map(x => x.RequisitionId, "RequisitionId"); Map(x => x.RequisitionDate, "RequisitionDate"); Map(x => x.RequisitionTrackCode, "RequisitionTrackCode"); ............. ....... } } This usage results in exception : nner Exception 1 Type: FluentNHibernate.Cfg.FluentConfigurationException Message: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail. Source: FluentNHibernate Stack Trace: at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() Inner Exception 2 Type: NHibernate.MappingException Message: (XmlDocument)(3,6): XML validation error: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'SOS_SP_REQUISITIONFLOWREPORT' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'. Source: NHibernate Stack Trace: at NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) at NHibernate.Cfg.Configuration.ValidationHandler(Object o, ValidationEventArgs args) at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(ValidationEventHandler eventHandler, Object sender, XmlSchemaValidationException e, XmlSeverityType severity) at System.Xml.Schema.XmlSchemaValidator.ElementValidationError(XmlQualifiedName name, ValidationState context, ValidationEventHandler eventHandler, Object sender, String sourceUri, Int32 lineNo, Int32 linePos, XmlSchemaSet schemaSet) at System.Xml.Schema.XmlSchemaValidator.ValidateElementContext(XmlQualifiedName elementName, Boolean& invalidElementInContext) at System.Xml.Schema.XmlSchemaValidator.ValidateElement(String localName, String namespaceUri, XmlSchemaInfo schemaInfo, String xsiType, String xsiNil, String xsiSchemaLocation, String xsiNoNamespaceSchemaLocation) at System.Xml.XsdValidatingReader.ProcessElementEvent() at System.Xml.XsdValidatingReader.ProcessReaderEvent() at System.Xml.XsdValidatingReader.Read() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at NHibernate.Cfg.Configuration.LoadMappingDocument(XmlReader hbmReader, String name) at NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader, String name) at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name) at NHibernate.Cfg.Configuration.AddDocument(XmlDocument doc, String name) at NHibernate.Cfg.Configuration.AddDocument(XmlDocument doc) at FluentNHibernate.PersistenceModel.Configure(Configuration cfg) at FluentNHibernate.Cfg.MappingConfiguration.Apply(Configuration cfg) at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration() Inner Exception 3 Type: System.Xml.Schema.XmlSchemaValidationException Message: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'SOS_SP_REQUISITIONFLOWREPORT' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'. Source: -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To unsubscribe from this group and stop receiving emails from it, send an email to fluent-nhibernate+unsubscr...@googlegroups.com. To post to this group, send email to fluent-nhibernate@googlegroups.com. Visit this group at http://groups.google.com/group/fluent-nhibernate. For more options, visit https://groups.google.com/d/optout.