Preventing mapping output for custom collection type

happoldt's Avatar

happoldt

28 Feb, 2010 09:19 PM via web

Hello,

I am trying to prevent fluent from outputting the collection-type tag for some of my collections. I currently use a custom accessors to modify these collections. Since some of the custom collections do not implement IUserType the mapping wont compile when informed of the collection type.

I am using the following fluent mapping:

HasMany(p => p.Objects).Access.Using(typeof (Accessor));

The mapping file generated includes the correct Accessor but does also includes the collection-type attribute. Markdown is giving me a hard time with the XML output, I can include it if necessary.

Is there any way to override this behavior?

  1. Support Staff 2 Posted by Paul Batum on 01 Mar, 2010 09:22 AM

    Paul Batum's Avatar

    There is now :)

    I've modified the behavior now so if you specify the collection type to be TypeReference.Empty, then it won't be written to the xml.

    Its available on my dev branch and should be in the official trunk in a few days.

  2. 3 Posted by happoldt on 01 Mar, 2010 04:28 PM

    happoldt's Avatar

    Thanks Paul!

    That's exactly what I needed.

    I cannot close this question because I moved my profile to an openId provider. Can someone mark it as resolved?

  3. Support Staff 4 Posted by James Gregory on 03 Mar, 2010 09:54 AM

    James Gregory's Avatar

    Closed as requested :)

  4. James Gregory closed this discussion on 03 Mar, 2010 09:54 AM.

Comments are currently closed for this discussion. You can start a new one.