HasMany And Protected Fields
Sorry if this has been asked to death -- I'm really not sure what terms I should be searching on...
What I'd like to do is
public class Project : Entity
{
public virtual string Name { get; set; }
protected virtual IList<Task> Tasks { get; set; }
...`
But it seems like my only option (at least with my very limited understanding) is to set the Tasks field to public.
My automapping model setup looks like this
var model = AutoMap.AssemblyOf<Project>()
.IgnoreBase<Entity>()
.Where(t => t.Namespace == "TaskTracker.Core" && t.IsSubclassOf(typeof(Entity)))
.Conventions.Add(PrimaryKey.Name.Is(x => "Id"),
DefaultLazy.Always(),
DefaultCascade.SaveUpdate(),
ForeignKey.EndsWith("Id"),
Table.Is(x => x.EntityType.Name));
`
Is there something I can set in there to say that my collections will always be set via protected fields?
Thanks for any help or pointers,
Joe