Is it possible to set a naming convention for all collection of an entity even if I use the Access Strategy or not, so that all collection names are {EnityName}s
instead of {entityName}s
(because of Access.CamelCaseField(Prefix.Underscore) the first letter is lower)?
Or is there a way where I can tell NHibernate that it shall use the associationPath case insensitive in the SetFetchMode
method?
This method is not case insensitive:
ICriteria SetFetchMode(string associationPath, FetchMode mode)
I try to build a type safe way of setting the associationPath
EDIT:
The associationPath is the name attribute of the collection.
<set access="field.camelcase-underscore" cascade="save-update" inverse="true" lazy="true" name="employees" table="TeamEmployee" mutable="true">
I want to define a naming convention for the name attribute.
EDIT:
I found something like this:
public class LowercaseCollectionNameConvention : IClassConvention
{
public void Apply(IClassInstance instance)
{
instance.Collections. ...
}
}
Does someone one know how to use this?