Makes sense. Thanks. On Fri, Feb 6, 2009 at 11:33 AM, James Gregory <[email protected]>wrote:
> 1. No purpose, it just does. Makes no difference to NHibernate so we've > never changed it. > 2. It's not just the properties that are sorted, it's everything that is. > We need to sort the mappings because NHibernate requires the elements to be > in a certain order (Ids at the top, subclasses at the bottom for example); > as a side effect, properties get reordered too. > > 3. We let NHibernate infer types mostly, we only explicitly set them when > it's actually needed or when we're overriding a type (custom collection > types for example). > > It's important to note that Fluent NHibernate a xml generator, so it's > output isn't really intended to be "pretty"; we just let you output them for > debugging purposes. > > > On Fri, Feb 6, 2009 at 4:51 PM, Anson Davis <[email protected]> wrote: > >> I'm outputting some mapping files made through FluentNHibernate to >> compare them to my existing hbm.xml files. I noticed a couple of >> things and could use some clarification >> >> 1. For each property, if you specify a column name in the property >> map, it adds a column element to the property element. E.g.: >> >> <property name="SomeField" column="SOME_FIELD" > >> <column name="SOME_FIELD" /> >> </property> >> >> instead of just >> >> <property name="SomeField" column="SOME_FIELD" /> >> >> What's the purpose of this? >> >> 2. The properties are sorted before they're written out (in >> ClassMapBase.writeTheParts ln196), so they don't appear in the same >> order in the ClassMap class as they do in hbm.xml file. Is this >> necessary? >> >> 3. There's no "type" or "class" attributes for most of the elements. >> I'm guessing the values are being inferred from the properties of the >> class type passed as the generic parameter for the ClassMap >> constructor, correct? >> >> Thanks. >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
