That error is basically saying that you forgot to map an ID. Not very clear
I know! I do think NHibernate could do a better job with its error messages,
and of course FNH could do some sanity checks to prevent the user from
getting as far as schema validation with a dodgy mapping. All in good time,
I guess.

On Fri, Dec 18, 2009 at 4:26 AM, tbushell <[email protected]> wrote:

>
>
> On Dec 16, 3:50 pm, James Gregory <[email protected]> wrote:
> > The NHibernate exceptions actually do contain a lot of information,
> > including the types. You just need to know how to read them. As the
> > exceptions are actually XML Schema violations, they can take some
> peculiar
> > forms, but once you understand what the schema is they're pretty easy.
>
> Not sure I understand.  The NHibernate message (taken from the Alex's
> Stack Overflow post) was:
>
> {"(XmlDocument)(3,6): XML validation error: 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, subselect, cache, synchronize, comment,
> tuplizer, id, composite-id' in namespace 'urn:nhibernate-
> mapping-2.2'."}
>
>
> I use an "ExportTo" in my configuration, which saves the XML mapping
> files to disk.  Are you saying that by examining these files we can
> determine which class failed to map?
>
> If so, do we have to scan every file, looking for the one that has a
> problem?  Or is there some clue in the message thrown by NHibernate
> that will tell us which class is failing (to me, all the info in the
> message above looks very generic).
>
> I'd love to get a better handle on this, and would appreciate any
> light you can shed on the issue.
>
> -Tom
>
>
> >
> >
> >
> > On Wed, Dec 16, 2009 at 8:47 PM, tbushell <[email protected]> wrote:
> >
> > > On Dec 15, 4:29 pm, James Gregory <[email protected]> wrote:
> > > > Fluent NHibernate != NHibernate. We're just a layer ontop of NH. Once
> we
> > > > pass off our mappings to NH, there's little we can do. We have plans
> to
> > > put
> > > > in a validation layer to try to catch the obvious cases (like missing
> Id)
> > > > before we pass off to NH, but the cryptic exceptions aren't our
> doing.
> >
> > > That sounds like a great idea.  Automapping is a terrific technology,
> > > but, IMO, is being hamstrung by arcane error messages.  There have
> > > been seveal times in the last few weeks I've been on the verge of
> > > chucking it.  (Glad I didn't - thanks again to the people on this list
> > > who helped me out!)
> >
> > > One of the biggest problems I see is that there's often no indication
> > > of which class or member that is causing the error.
> >
> > > Would it be worthwhile if several of we Fluent NH users submitted
> > > requests to the NH team to put more specific info in their error
> > > messages (e.g. which class, which member, etc)?
> >
> > > -Tom
> >
> > > --
> >
> > > 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]<fluent-nhibernate%[email protected]>
> <fluent-nhibernate%2bunsubscr­[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/fluent-nhibernate?hl=en.- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
>
> 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]<fluent-nhibernate%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>
>

--

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