A
Andy
Hi,
I have an Association on my table; the association doesn't seem to
load. Here's the association:
private EntityRef<Shared.Employee> createdBy =
default( EntityRef<Shared.Employee> );
[Association( ThisKey = "CreatedById", IsForeignKey = true )]
public Shared.Employee CreatedBy {
get { return createdBy.Entity; }
set { createdBy.Entity = value; }
}
I try to access the association like this:
createdByName = myClass.CreatedBy.LogonName; // Shouldn't this cause
CreatedBy to load?
Instead I get a NullReferenceException. CreatedById is a valid value
and a record does exist, but Linq never seems to even bother executing
the select to load the Shared.Employee instance.
Any ideas?
Thanks
Andy
I have an Association on my table; the association doesn't seem to
load. Here's the association:
private EntityRef<Shared.Employee> createdBy =
default( EntityRef<Shared.Employee> );
[Association( ThisKey = "CreatedById", IsForeignKey = true )]
public Shared.Employee CreatedBy {
get { return createdBy.Entity; }
set { createdBy.Entity = value; }
}
I try to access the association like this:
createdByName = myClass.CreatedBy.LogonName; // Shouldn't this cause
CreatedBy to load?
Instead I get a NullReferenceException. CreatedById is a valid value
and a record does exist, but Linq never seems to even bother executing
the select to load the Shared.Employee instance.
Any ideas?
Thanks
Andy