Hello,
I'd like to create a typed list. The query in sql would be something like:
select p.pin, p.forename, p.surname,c.country
from person.p left join c.country on
p.countryid=c.coutnryid and c.activeind=0
where p.activeind=0
My code so far is
dim fields as new ResultsetFields(4)
dim filter as RelationPredicateBucket
fields.DefineFields(PersonFieldIndex.pin,0,"Pin","Person")
fields.DefineFields(PersonFieldIndex.forename,1,"Forename","Person")
fields.DefineFields(PersonFieldIndex.surname,2,"Surname","Person")
fields.DefineFields(CountryFieldIndex.coountry,3,"Country","Country")
filter.Relations.Add(PersonEntity.Relations.CountryEntityUsingCountryid,JoinHint.Left)
filter.PredicateExpression.Add(PredicateFactory.CompareValue(PersonFieldIndex.activeind,ComparisonOperator.Equal,0))
This works fine except it does not join my table with c.activeind=0.
How would I do it?
L