Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 614415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:06:34+00:00 2026-05-13T18:06:34+00:00

am trying to implement fluent nhibernate in MVC project…there were no build errors… but

  • 0

am trying to implement fluent nhibernate in MVC project…there were no build errors… but when i run the project i get this exception

System.Xml.Schema.XmlSchemaValidationException: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has incomplete content. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'.

have no idea what am doing wrong here… the following is the code for opening session factory…

Private Function CreateSessionFactory() As ISessionFactory
    Dim sessionFactoryObject As ISessionFactory
    sessionFactoryObject = Fluently.Configure().Database(FluentNHibernate.Cfg.Db.MsSqlConfiguration.MsSql2005.ConnectionString("Data Source=.\sqlexpress;Initial Catalog=Designs;User ID=sa;Password=root")).Mappings(Function(x) x.FluentMappings.Add(GetType(DesignMap))).BuildSessionFactory()
    Return sessionFactoryObject
End Function

this is really driving me nuts….thanks in advance…:)

update-the mappings
the design table map

Public Class DesignMap
Inherits ClassMap(Of Design)

Public Sub DesignMap()
    Table("DesignList")
    Id(Function(x) x.DesignId)
    Map(Function(x) x.DesignType)
    References(Function(x) x.Designer, "DesignerId")
End Sub
End Class

the designer table map

Public Class DesignerMap
Inherits ClassMap(Of Designer)
Public Sub DesignerMap()
    Table("DesignerList")
    Id(Function(x) x.DesignerId)
    Map(Function(x) x.DesignerName)
    Map(Function(x) x.DesignerCompany)
    HasMany(Function(x) x.DesignersDesigns)
End Sub
End Class

new edit– the entity property looks like this

    Public Overridable Property Name() As String
     Get
        Return _name
     End Get
     Protected Set(ByVal value As String)
        _name = value
     End Set
    End Property

am i going the right way..?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:06:35+00:00Added an answer on May 13, 2026 at 6:06 pm

    found the problem…the constructor for the map was wrong…it should be like this…

    Public Class DesignMap
     Inherits ClassMap(Of Design)
    
     Public Sub New()
      Table("DesignList")
      Id(Function(x) x.DesignId)
      Map(Function(x) x.DesignType)
      References(Function(x) x.Designer, "DesignerId")
    End Sub
    End Class
    

    problems of working in both C# and vb.net at the same time i guess..!!

    and “Matthew Talbert” was correct…making all the properties Overrideable is important..

    thanks guys…:)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What would be the best way to implement fluent-nhibernate regarding project architecture? I have
I've been trying to implement cache regions with fluent nhibernate and I've done the
I am trying to implement Bidirectional Mapping with Fluent NHibernate Mapping. Code snippet from
Trying to implement AVAudioplayer and get some metering data of the played music, but
I'm trying implement my project in Apache Struts 2 but I'm not very familiar
While trying to implement an MVC file upload example on Scott Hanselman's blog. I
I have been trying to implement Nhibernate.Linq 1.0.0.4000 together with Nhibernate 2.1.2.4000. After what
I've been trying to implement a fluent interface for a set of rules in
Trying to implement this gallery on my website. http://coffeescripter.com/code/ad-gallery/ It is noted in the
I've been building an application with Fluent nHibernate/ASP.NET MVC - and I've dug around

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.