XML manipulation in FNH

0 views
Skip to first unread message

mcintyre321

unread,
Feb 4, 2009, 4:26:05 PM2/4/09
to Fluent NHibernate
I've just had an error while trying to automap some inheritance. "The
element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid
child element 'joined-subclass'"

I may be barking slightly up the wrong tree about how the guts of
FluentNH work, but it looks to me like FNH builds up a virtual xml
mapping file, then parses it. I have a suggestion to make this easier.
A while back I did some experiments with generating a statically typed
object model for the Linq To Sql XSD schema using the alpha 0.2
release of Linq to XSD. If you were to generate a class model based on
the NHibernate XSD schema you might find manipulating the virtual
mapping file a lot easier - for example, it wouldn't be possible to
add invalid elements to a particular node. I've generated one of these
models for NH before using Linq To XSD when I was thinking about
making a similar tool to FNH, but I stopped experimenting on it when
FNH came along.

Oh I've just had a look at the source it looks like its already been
done manually... Basically you can generate a load of the stuff in
the .Mapping namespace

James Gregory

unread,
Feb 4, 2009, 4:47:07 PM2/4/09
to fluent-n...@googlegroups.com
You get that exception when then ordering is incorrect in the XML, this sounds like a bug.

The idea of a model between the mapping and XML is one we're already in the process of tackling, Paul Batum is working feverishly at it.

Paul Batum

unread,
Feb 5, 2009, 8:45:20 PM2/5/09
to fluent-n...@googlegroups.com
Indeed I am! Stay tuned :)
Reply all
Reply to author
Forward
0 new messages