Obtaining an EntityType (or int) through an IEntityRelation?

Posts   
 
    
Posts: 65
Joined: 07-Dec-2005
# Posted on: 08-Dec-2005 16:56:42   

Is it possible to obtain an EntityType (or its int value) for the PK or FK object in an IEntityRelation?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 08-Dec-2005 16:57:40   

Could you please describe the context in which you want to use it? Perhaps there's an alternative to what you want (as the entitytype isnt directly available)

Frans Bouma | Lead developer LLBLGen Pro
Posts: 65
Joined: 07-Dec-2005
# Posted on: 08-Dec-2005 18:20:57   

I'm creating a dynamic filter engine. I would like to allow a user to choose a relation, then pick fields that belong to the entity on the other side of that relation.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 10-Dec-2005 17:06:37   

The best way to do this I think is to pre-generate code / data from the project. You can do this by writing some templates which produce code you need / data you can use at runtime for the purpose of your generic search engine. With a few template statements you can already produce the data you need I think.

Frans Bouma | Lead developer LLBLGen Pro