Have you tried? Implement the IClassConvention interface, and as you need an
Accept method also implement IClassConventionAcceptance. You'll then get the
appropriate parameters to your methods, and I'd really hope you should be
able to figure it out from there.
Conventions<http://wiki.fluentnhibernate.org/Conventions>on the wiki,
and acceptance
criteria<http://wiki.fluentnhibernate.org/Conventions#Conditional_applying_of_convention>
.

On Tue, Aug 18, 2009 at 3:29 PM, Richard Evans <[email protected]>wrote:

>
> We've got a convention that I'd like to port to RC1. Any suggestions
> for the best way to migrate this?
>
> public class EnumerationTypeShouldBeIntegerNotStringConvention :
> IClassConvention
>    {
>        public bool Accept(IClassMap target)
>        {
>            return target.GetType() == typeof(Enum);
>        }
>
>        public void Apply(IClassMap target)
>        {
>            target.SetAttribute("type", "int");
>        }
> }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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