I have a table, let call it Widget, with (among others) person1id and person2id. (Yes, I suppose I should have setup a N-N relation table, but so far we never have more than 2 persons on a single widget. )
Person1Id (and person2id of course) are linked to a person table with yes another link to a PersonDetail table.
How can I query a list of Widgets with 2 persons and 2 persondetails, filtering on a persondetail field? If I had just one personid in my widget I would do:
RelationCollection relationsToUse = new RelationCollection();
relationsToUse.Add(WidgetEntity.Relations.PersonEntityUsingPerson1Id);
relationsToUse.Add(PersonEntity.Relations.PersonDetailsEntityUsingDetailId);
PredicateExpression filter = new PredicateExpression(new FieldCompareValuePredicate(PersonDetailsFields.ModifiedDate, ComparisonOperator.GreaterEqual, startdate)); //whatever
var list = new WidgetCollection();
list.GetMulti(filter, relationsToUse);
So how do I get the second relation in? relationsToUse.Add(WidgetEntity.Relations.PersonEntityUsingPerson2Id);
?
I'm using LLBLgen 2.6 with .net 3.5. I did see the related question here but it's not the same.