i have 4 class that i shown their implementation in below , and i use fetch plan to give appropriate resault of this table but fetch plan does not work properly:
my classes and the implementation fech group for their :
----------------------------------------------------
[Telerik.OpenAccess.
Persistent()]
public abstract class ORGContact
{
[Telerik.OpenAccess.
FetchField("InternalPersonnel")]
private string FFamily;
[Telerik.OpenAccess.
FetchField("InternalPersonnel")]
private string FName;
[Telerik.OpenAccess.
FetchField("InternalPersonnel")]
private ContactType FType;
.
. //other field that are not define in fetch group
.
}
----------------------------------------------------
[Telerik.OpenAccess.
Persistent(IdentityField = "FId")]
public class ORGPersonJob {
private int FId;
[Telerik.OpenAccess.
FetchField("InternalPersonnel")]
private ORGPerson FORGPerson;
[Telerik.OpenAccess.
FetchField("InternalPersonnel", Next = "InternalPersonnel")]
private ORGJob FORGJob;
.
. //other field that are not define in fetch group
.
}
----------------------------------------------------
[Telerik.OpenAccess.
Persistent(IdentityField = "FId")]
public class ORGPerson : ORGContact {
[Telerik.OpenAccess.
FetchField("InternalPersonnel")]
private int FId;
[Telerik.OpenAccess.
FetchField("InternalPersonnel", Next = "InternalPersonnel")]
[Telerik.OpenAccess.
Depend()]
private IList<ORGPersonJob> FORGPersonJobs;
.
. //other field that are not define in fetch group
.
}
----------------------------------------------------
[Telerik.OpenAccess.
Persistent(IdentityField = "FId")]
public class ORGJob {
[Telerik.OpenAccess.
FetchField("InternalPersonnel")]
private int FId;
private bool FArchive;
[Telerik.OpenAccess.
FetchField("InternalPersonnel")]
private string FTitle;
.
. //other field that are not define in fetch group
.
}
----------------------------------------------------
and i use this code to retrieve oppropriate fields , but this query resault only all fields of ORGPerson table :
scope.Transaction.Begin();
scope.Transaction.Commit();
scope.FetchPlan.Clear();
scope.FetchPlan.Add(
"InternalPersonnel");
scope.FetchPlan.MaxDepth = 3;
var query = (from q in scope.Extent<ORGPerson>()
where q.Type == EandE.Framework.Managers.Utilities.ContactType.InternalPerson
select q).ToList();
return query;
----------
where is my problem ??
i want only three field ("Name","Family","Job")