Hi Daelmo,
I am already using the 2 classes solution, which means I mostly use the subclasses generated by LLBLGen. In the generated subclasses, the entity collections (that map 1:n relationships) doen't use the subclass, but the original class. In my example, MyImport has members of the type Report (an import consists of a number of reports), instead of MyReport. During runtime MyReport elements are returned, but not while compiling.
This is the code generated
/// <summary> Gets the EntityCollection with the related entities of type 'MBReportEntity' which are related to this entity via a relation of type '1:n'.
/// If the EntityCollection hasn't been fetched yet, the collection returned will be empty.</summary>
[TypeContainedAttribute(typeof(MBReportEntity))]
public virtual EntityCollection<[b]MBReportEntity[/b]> MBReport
import.Report is an EntityCollection of type EntityCollection<MBReportEntity>. It is also not possible to up cast EntityCollection<MBReportEntity> to EntityCollection<MyMBReportEntity>, as vs would not take that.
My question is, why aren't the members the map to 1:n relationships defined as subclasses, something like?
[TypeContainedAttribute(typeof(MBReportEntity))]
public virtual EntityCollection<[b]My[/b]MBReportEntity> MBReport
Best regards