How to discover "Fields mapped on related fields" at runtime.

Posts   
 
    
Posts: 27
Joined: 16-Jul-2007
# Posted on: 02-Dec-2008 20:48:47   

'runtime' means reflective instantiation in a customtool for purpose of generating dto code.

Getting intrinsic fields is not a problem using FieldInfoProvider. Related Entities/Collections are easily discovered via GetAllRelations.

But I am having no luck finding a vector for discovering fields mapped on related entity fields.

Am currently generating a new info class in template enumerating info for these fields but wish to remove the custom template requirement and get the info from the dbGeneric assembly directly.

Am I missing something or will I need to continue with the custom info object strategy?

thanks, Sky

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 02-Dec-2008 21:42:00   

I'm struggling to see anywhere else - I'll pass it up to the development team to see if they have any further ideas.

Matt

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 03-Dec-2008 10:21:42   

This information isn't available at runtime, as fields mapped onto related fields are more or less custom properties and we're not aware of a use case to have this meta-data information (which thus won't be used by the framework) in the generated code.

So as you need this extra information, it's best to generate this information through a template, as it's not available at runtime because the framework doesn't use that information itself.

Frans Bouma | Lead developer LLBLGen Pro