Ryan, as far as I can tell WriteMappingsTo does nothing to affect the
ordering of the properties. What exactly are you seeing that differs?
PersistenceModel.Configure uses the MappingVisitor which calls ApplyMappings
on each mapping, which itself calls CreateMapping which uses writeTheParts
and doe
The only thing I can think of is maybe this in ClassMapBase:
protected void writeTheParts(XmlElement classElement, IMappingVisitor
visitor)
{
_properties.Sort(new MappingPartComparer());
foreach (IMappingPart part in _properties)
{
part.
I'm still confused by how they can be different orders.
This is how the mappings are added to NHibernate:
public virtual void Configure(Configuration configuration)
{
_configured = true;
MappingVisitor visitor = new MappingVisitor(_conventions, configuration,
_chain);
_mappings.ForEach(mappi
I believe that using the PersisitnceModel.WritemappingsTo yields
diferent results than the XML that is acutally used if you don't write
the mapings though. By different, I mean the order of the properties
are different. So as long as you are not concerned about what order
the properties come in th
As Andrew said, the PersistenceModel has a WriteMappingsTo(string folder)method.
On Thu, Jan 8, 2009 at 4:03 PM, Mart Leet wrote:
> To see my xml in testexplorer i created
> this:Console.Write(XElement.Parse(CreateMapping(new
> MappingVisitor()).FirstChild.NextSibling.InnerXml,
> LoadOptions.Pr
To see my xml in testexplorer i created
this:Console.Write(XElement.Parse(CreateMapping(new
MappingVisitor()).FirstChild.NextSibling.InnerXml,
LoadOptions.PreserveWhitespace).ToString());
Not much, but readable...
On Thu, Jan 8, 2009 at 5:57 PM, Troy Goode wrote:
>
> I know from my recent foray
Hi Troy
You should be able to use PersistenceModel to write the mappings instead.
Andy
On Thu, Jan 8, 2009 at 3:57 PM, Troy Goode wrote:
>
> I know from my recent foray into automapping that I can see what the
> XML produced by the automapper is using:
>
> automapper.WriteMappingsTo("folderpath