Related field

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 08-Nov-2005 17:14:31   

Hi,

Say I have a category entity which has a 'parentID' field which references another category, I want to add the parent's name to the category entity. What is the best way to do this?

If I map a field to a related field then that means doing a prefetch to retrieve the whole of the related entity. I just want to be able to retrieve the name value using a join rather than a sub query.

Is this possible?

Cheer, I.

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 09-Nov-2005 02:57:41   

You can create a typedlist, use a view, or define your own code to fill the field in a usercode region if you would rather just have the item available for the entity.

Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 09-Nov-2005 13:36:34   

Do you mean a dynamic list?

Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 09-Nov-2005 14:50:21   

Oh yes, the TypedList works great. Thanks.