Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Multiple parent/child relations between 2 tables
Re: Multiple parent/child relations between 2 tables [message #1355 is a reply to message #1347] Thu, 29 May 2008 14:44 Go to previous messageGo to previous message
ikatz is currently offline  ikatz
Messages: 40
Registered: December 2007
Location: Durham, NH
Member
Quote:

If you look in the menu system at the relationships between the MNU_TASK and MNU_MENU tables you will see that the column name 'task_id' has to be translated to either 'menu_id' or 'task_id_jnr', and this is done by custom code as it cannot be done automatically by the framework.


That is interesting.

What I took from the documentation was that the translation between field names in different tables was done by the dict file (this is a portion of my task_order.dict.inc):
    // parent relationship details
    $this->parent_relations[]       = array('parent' => 'task',
                                            'alias' => 'task_blocked',
                                            'parent_field' => 'name as taskblocked_name',
                                            'fields' => array('blocked_task_id' => 'task_id'));

    $this->parent_relations[]       = array('parent' => 'task',
                                            'alias' => 'task_waiting',
                                            'parent_field' => 'name as taskwaiting_name',
                                            'fields' => array('waiting_task_id' => 'task_id'));


I am having trouble seeing what the mnu_menu.dict.inc and mnu_task.dict.inc files are doing differently from mine (unless parent_field is causing my problem... is it?). Also, nothing in the mnu_task.class.inc or mnu_menu.class.inc files is jumping out at me as a solution to the problem I am seeing. Where should I be looking for the code that does the translation?

Is there a cut-down version of this in the documentation somewhere? I feel like I am missing something obvious.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How do you deploy your app?
Next Topic: Use update2 pattern when I have two tables parent->child
Goto Forum:
  


Current Time: Thu May 09 15:58:25 EDT 2024

Total time taken to generate the page: 0.00982 seconds