Native language filter construction + alias

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 08-Jun-2006 17:58:36   

Is it possible to use the Native language filter construction with an entity alias?

Thanks,

Phil

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 09-Jun-2006 08:48:41   

Use field.SetObjectAlias(...) where field is something like CustomerFields.CompanyName

psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 12-Jun-2006 18:03:56   

Walaa wrote:

Use field.SetObjectAlias(...) where field is something like CustomerFields.CompanyName

Hmm, I'm not sure I get this. Can you post a full example?

Once I set the alias, how do I use it in the filter construction?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 12-Jun-2006 22:40:03   

IPredicate filter = (CustomerFields.CompanyName.SetObjectAlias("Foo") == "Solutions Design");

Frans Bouma | Lead developer LLBLGen Pro
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 13-Jun-2006 15:40:09   

Otis wrote:

IPredicate filter = (CustomerFields.CompanyName.SetObjectAlias("Foo") == "Solutions Design");

Ahhhhhhhhhh, I see. Works like a charm, thanks!