NickD wrote:
I had set up my IRelationPredicateBucket var and was going to do this:
buketVar.Relations.Add(new EntityRelation(EntityFieldFactory.Create(EntityAFieldIndex.ColumnA), EntityFieldFactory.Create(EntityBFieldIndex.ColumnA),RelationType.OneToMany);
...but when I tried to compile, it told me that IEntityField2 could not convert to IEntityField. I was surprised. I got around it simply by creating an IEntityRelation var and doing an AddEntityFieldPair to it, but that seems like an extra step. I'm sure you lay this out in the docs some where but curious why the Relations.Add only expects IEntityField and not IEntityField2?
Hi, there. It sounds like you're using the wrong EntityFieldFactory. Do you perhaps have a reference to both a Self-Servicing DAL as well as an Adapter DAL? If so, make sure you're using the Adapter's EntityFieldFactory.
Also, it looks like you're creating a custom relationship? Is that what you're intending to do, or are you trying to add an existing relationship set up in the DB? If you don't need a custom relationship, you should be able to use
bucketVar.Relations.Add(EntityAEntity.Relations.EntityBUsingEntityBID);
Jeff...