I've a set small inheritance setup as follows
RoleEntity (abstract)
- ContractEntity
- PermanentEntity
I'm trying to fetch all roles regardless of type with the following :
var roles = new EntityCollection<RoleEntity>();
using (var adapter = new DataAccessAdapter()) {
adapter.FetchEntityCollection(roles, null);
}
but it bombing out with
System.MissingMethodException: No parameterless constructor defined for this object
Line 71: public EntityCollection() : base( (IEntityFactory2)null )
Line 72: {
Line 73: }
So then I tried declaring the Entity Collection as:
var roles = new EntityCollection<RoleEntity>(new RoleEntityFactory());
But now I get an error that fieldindex '16' does not exist for PermanentRoleEntity.
Any pointers as to where I'm going wrong?
Thanks!
Thanks
Garrett