I've a MS SQL database, (not a big one), when trying to do mapping my POCOs using this snippet
var configuration = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(x => x.Is(MetaResources.Properties.Settings.Default.erpConnectionString)))
.ProxyFactoryFactory<NHibernate.ByteCode.Spring.ProxyFactoryFactory>()
.Mappings(mappings => mappings.FluentMappings.AddFromAssemblyOf<RescueCars.Domain.Model.SysUser>())
.BuildConfiguration();
I got this error
An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
The inner exception for this exception is
{"(XmlDocument)(3,6): XML validation error: The element 'composite-id' in namespace 'urn:nhibernate-mapping-2.2' has incomplete content. List of possible elements expected: 'meta, key-property, key-many-to-one' in namespace 'urn:nhibernate-mapping-2.2'."}
I reviewed my tables, and insure that: - Every table has a primary key - Every table has an Identity column (and it is the PK)
I know that it is not mandatory, but I think this information could help us find the problem.
I'm using C# 4.0, NHibernate 3.1.0.x, FLuent NHiberntae
as the error shows, the problem could be in one of the following:
meta, key-property, key-many-to-one
the last two, i think I understand them, but I don't know what kind of problems that could be existed in those. the first one 'meta' I don't understand what is it?
could anyone help me find where is the problem ??