Hello James, thanks for the answer.
I will keep my current way of doing it, and wait and see if it will be changed/fixed sometime in the future. :) Martin On Feb 3, 8:44 pm, James Gregory <jagregory....@gmail.com> wrote: > The best way is the way that you've done it, with the > GetComponentColumnPrefix; however, you've obviously highlighted a flaw in > our design that needs to be fixed. > > > > On Wed, Feb 3, 2010 at 5:04 PM, Martin From <f...@pc.dk> wrote: > > I am try to write a Component Convention soo that every Property in a > > component gets mapped to a column of etc. Component/Class Name + "-" + > > Property name ("MyComponent-Address"). > > > I currently have the following code > > > public class ComponentConvention : IComponentConvention > > { > > public void Apply(IComponentInstance instance) > > { > > foreach (var property in instance.Properties) > > { > > string columnName = String.Format("{0}-{1}", > > instance.EntityType.Name, property.Name); > > // property.Column(columnName) <- How can it be done > > !?!??!! > > } > > } > > } > > > The problem seems that instance.Properties returns IPropertyInspector > > and not IPropertyInstance so i can call the property.Column() method. > > > How can i set the column name for each property ? > > > Martin > > > ps. right now i have only got it working by using > > GetComponentColumnPrefix when creating the AutoPersistenceModel > > object. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Fluent NHibernate" group. > > To post to this group, send email to fluent-nhibern...@googlegroups.com. > > To unsubscribe from this group, send email to > > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/fluent-nhibernate?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.