Adapter
Beta May 25th, 2006
I've been using the beta generator fine now on three small projects. However, in this most recent generation of a brand new project, one class is generating a:
"An object reference is required for the nonstatic field, method or property 'HLPUSD.BOSS.DAL.EntityClasses.PersonContactEntity.RelationType.get'"
when it compiles. Here is the "offending" line of code:
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'CdRelationshipType'
/// for this entity. Add the object returned by this property to an existing PrefetchPath2 instance.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathCdRelationshipType
{
get
{
return new PrefetchPathElement2(new EntityCollection(new CdRelationshipTypeEntityFactory()),
PersonContactEntity.Relations.CdRelationshipTypeEntityUsingRelationType,
(int)HLPUSD.BOSS.DAL.EntityType.PersonContactEntity, (int)HLPUSD.BOSS.DAL.EntityType.CdRelationshipTypeEntity, 0, null, null, null, null, "CdRelationshipType", RelationType.ManyToOne);
}
}
...which looks like all the other generated lines of code in the other entities. What in my database do you think has confused things?
Also, I get a compiler error on the "RelationType.ManyToOne" that says:
"'string' does not contain a definition for 'ManyToOne'"
...I've checked all my references and they appear OK.