illegal access to loading collection
I have this error in the collection CategoryTranslated of class Category: illegal access to loading collection
public class Category : Entity
{
public Category()
{
CategoriesTranslated = new List<CategoryTranslated>();
}
public virtual Category Parent { get; set; }
public virtual string Name { get; set; }
public virtual IList<CategoryTranslated> CategoriesTranslated { get; set; }
}
public class CategoryTranslated : Entity
{
public CategoryTranslated()
{
}
public virtual Category Category { get; set; }
public virtual LanguageType Language { get; set; }
public virtual string Name { get; set; }
}
public void Override(AutoMapping mapping)
{
mapping.HasMany(x => x.CategoriesTranslated)
.Inverse()
.Cascade.All();
}
public void Override(AutoMapping mapping)
{
mapping.References(x => x.Category);
}
Where is it wrong? thank you
Support Staff 2 Posted by James Gregory on 22 Jul, 2010 11:04 AM
What's the full exception?
3 Posted by Andrea on 22 Jul, 2010 12:24 PM
I found the solution.
It was the LanguageType enum that was not configured correctly.
Thank you to all