PredicateFactory not udpated for typed list

Posts   
 
    
Posts: 19
Joined: 03-Feb-2006
# Posted on: 31-May-2006 18:04:47   

Hi,

I created typed list MyList but when I generate code the PredicateFactory is not updated and there are no overloaded methods that take MyListFieldIndex as parameter thus I can not create filters. Any idea what's going on?

Pawel

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 01-Jun-2006 02:37:37   

You should be able to use the field indexes from the entities that are represented in the typedlists. So if you have MyTable in your typedlist then you can use MyTableFieldIndex in your predicate.

Posts: 19
Joined: 03-Feb-2006
# Posted on: 01-Jun-2006 12:26:29   

bclubb wrote:

You should be able to use the field indexes from the entities that are represented in the typedlists. So if you have MyTable in your typedlist then you can use MyTableFieldIndex in your predicate.

I can access MyTableFieldIndex but it deas not help. If I can not use PredicateFactory I have to create EntityField on my own. It's not very handy because constructor of this type takes 20 or so paramters. It is possible but that's not what I expect from this tool.

Pawel

Rogelio
User
Posts: 221
Joined: 29-Mar-2005
# Posted on: 01-Jun-2006 13:08:52   

Pawel wrote:

bclubb wrote:

You should be able to use the field indexes from the entities that are represented in the typedlists. So if you have MyTable in your typedlist then you can use MyTableFieldIndex in your predicate.

I can access MyTableFieldIndex but it deas not help. If I can not use PredicateFactory I have to create EntityField on my own. It's not very handy because constructor of this type takes 20 or so paramters. It is possible but that's not what I expect from this tool.

Pawel

Hi,

To use the PredicateFactory with your tupedlist you have to use the entityFieldIndex of any of the entities that are part of your typedlist. May be you think this is weird; but this is great because this allow you to filter to typedlist by fields that are not included in your typedlist but that belongs to any of the entities that are part of your typedlist.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 01-Jun-2006 13:10:17   

Typedlists are filtered on the entity fields inside the typedlist. So if I have a typedlist with OrderEntity and CustomerEntity and I want to filter the typedlist on all customers from UK, then I should filter on CustomerFieldIndex.Country and pass a value of "UK" to the predicatefactory.CompareValue method.

Then use that filter to filter the typedlist.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 19
Joined: 03-Feb-2006
# Posted on: 01-Jun-2006 16:13:41   

Otis wrote:

Typedlists are filtered on the entity fields inside the typedlist. So if I have a typedlist with OrderEntity and CustomerEntity and I want to filter the typedlist on all customers from UK, then I should filter on CustomerFieldIndex.Country and pass a value of "UK" to the predicatefactory.CompareValue method.

Then use that filter to filter the typedlist.

Thanks, that what I was looking for simple_smile