I am using automap to map a domain model (simplified version):
public class AppUser : Entity
{
[Required]
public virtual string NickName { get; set; }
[Required]
[DataType(DataType.Password)]
public virtual string PassKey { get; set; }
[Required]
[DataType(DataType.EmailAddress)]
public virtual string EmailAddress { get; set; }
public virtual IList<PreferencesDescription> PreferencesDescriptions { get; set; }
}
public class PreferencesDescription : Entity
{
public virtual AppUser AppUser { get; set; }
public virtual string Content{ get; set; }
}
The PreferencesDescriptions collection is mapped as an IList, so is an indexed collection (when I require standard unindexed collections I use ICollection).
The fact is that fluent nhibernate's automap facilities map my domain model as an unindexed collection (so there's no "position" property in the DDL generated by SchemaExport).
¿How can I make it without having to override this very case - I mean, how can I make Fluent nhibernate's automap make always indexed collections for IList but not for ICollection