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 [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.