Indeed, there are quite a few places where its easy to make a really simple
mistake (I've made the exact one you are referring to) that fluent
nhibernate could detect and report a specific error for. However this sort
of thing ends up having a low priority...

On Tue, Feb 10, 2009 at 3:31 PM, Billy <[email protected]> wrote:

>
> I've spent a while tracking down the following exception which ended
> up being due to the fact that my auto-mapping had a typeo in the
> identifier case; e.g., c.FindIdentity = type => type.Name == "Id";
> (should have been "ID").  I don't mind running into an exception due
> to this, but it would be great if Fluent NHibernate could report more
> descriptive errors than the one shown below.  I'm sure this is a bit
> difficult, but descriptive exceptions are a big help.  Thanks!
>
> ///// Example dxception from wrongly cased "Id" definition for
> FindIdentity /////
>
>  The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has
> invalid child element 'property' in namespace 'urn:nhibernate-
> mapping-2.2'. List of possible elements expected: 'meta, jcs-cache,
> cache, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'.
> Description: An unhandled exception occurred during the execution of
> the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
>
> Exception Details: System.Xml.Schema.XmlSchemaValidationException: The
> element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid
> child element 'property' in namespace 'urn:nhibernate-mapping-2.2'.
> List of possible elements expected: 'meta, jcs-cache, cache, id,
> composite-id' in namespace 'urn:nhibernate-mapping-2.2'.
>
> Source Error:
>
> Line 125:                }
> Line 126:                else {
> Line 127:
> autoPersistenceModel.addMappingsFromAssembly(assemblyToInclude);
> Line 128:                    cfg.AddAutoMappings
> (autoPersistenceModel);
> Line 129:                }
>
>
> Source File: C:\MyStuff\Projects\SharpArchitecture\src\SharpArch
> \SharpArch.Data\NHibernate\NHibernateSession.cs    Line: 127
>
> //////////
>
> Thanks James!
> Billy McCafferty
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to