Hello,
I'm trying to get performance improvement using FetchGroup/FetchPlan by avoiding to get a huge byte[] from the DB.
I've defined a fetchGroup in my BO as shown below:
[Telerik.OpenAccess.
Persistent(IdentityField="mathKernelId")]
public partial class MathKernel
{
[
FetchField("WithoutMathCode")]
private long mathKernelId; // pk
private byte[] mathCode;
[FetchField("WithoutMathCode")]
private string mathKernelName;
[FetchField("WithoutMathCode")]
private string mathKernelVersion;
[FetchField("WithoutMathCode")]
private DateTime? modifiedAt;
}
I used the fetchplan browser to generate the FetchPlans class
public class FetchPlans
{
public static FetchPlan MathKernelWithoutMathCodePlan =
new FetchPlan(
new string[] { "WithoutMathCode"},
FetchPlan.DefaultMaxDepth,
FetchPlan.NoLimit ) ;
}
When I try to use this fetch plan, it seems to be ignored and I get the complete object including the byte array on "mathCode"
scope.FetchPlan =
FetchPlans.MathKernelWithoutMathCodePlan;
scope.FetchPlan.Add("WithoutMathCode");
var result = from o in scope.Extent<MathKernel>()
select o;
When I examine the scope.FetchPlan I cannot see any change after the scope.FetchPlan = FetchPlans.MathKernelWithoutMathCodePlan;
statement. It seems as this statement is ignored.
I also tried
scope.FetchPlan.Clear();
scope.FetchPlan.Add("WithoutMathCode");
Same result.
Do you have a hint?
Regards,
Burkhard
PS. I'm using Telerik.OpenAccess for .NET 2.0: 2009.1.405.1