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

Home » RADICORE » How To » Missing calculated field in relationship
Re: Missing calculated field in relationship [message #2253 is a reply to message #2247] Tue, 11 August 2009 05:34 Go to previous messageGo to previous message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
I did a quick test by removing the alias on the previous relationship and it did indeed fix the issue with the problem relationship. The full set of relationships is below. The alias causing the problem is 'session_type_id as branch_session_type_id' in the relationship with the branch table, immediately before the relationship with the candidate table.

    $this->child_relations                  = array();
    
    // parent relationship details 
    $this->parent_relations[]               = array('parent' => 'branch',
                                                    'parent_field' => 'branch_id, branch_desc, branch_abbrev, syllabus_type_id, student_branch_abbrev, crf_type_id, session_type_id as branch_session_type_id',
                                                    'fields' => array('branch_id' => 'branch_id'));
    
    $this->parent_relations[]               = array('parent' => 'candidate',
                                                    'parent_field' => 'concat(first_name, \' \', last_name) as person_name, age_group_id, dob_date, first_name, last_name, gender, candidate_pin, student_ind, addr_line_1, addr_line_2, addr_line_3, town, county, postcode, email_addr, home_telephone, mobile_telephone',
                                                    'fields' => array('candidate_id' => 'candidate_id',
                                                                      'rdcaccount_id' => 'rdcaccount_id'));
    
    $this->parent_relations[]               = array('parent' => 'dance',
                                                    'alias' => 'd1',
                                                    'parent_field' => 'dance_code as dance1_code',
                                                    'fields' => array('dance1_id' => 'dance_id'));
    
    $this->parent_relations[]               = array('parent' => 'dance',
                                                    'alias' => 'd2',
                                                    'parent_field' => 'dance_code as dance2_code',
                                                    'fields' => array('dance2_id' => 'dance_id'));
    
    $this->parent_relations[]               = array('parent' => 'dance',
                                                    'alias' => 'd3',
                                                    'parent_field' => 'dance_code as dance3_code',
                                                    'fields' => array('dance3_id' => 'dance_id'));
    
    $this->parent_relations[]               = array('parent' => 'dance',
                                                    'alias' => 'd4',
                                                    'parent_field' => 'dance_code as dance4_code',
                                                    'fields' => array('dance4_id' => 'dance_id'));
    
    $this->parent_relations[]               = array('parent' => 'grade',
                                                    'parent_field' => 'grade_code, grade_desc',
                                                    'fields' => array('grade_id' => 'grade_id'));
    
    $this->parent_relations[]               = array('parent' => 'school',
                                                    'parent_field' => 'school_name, principal_name, principal_mem_num, school_addr_line_1, school_addr_line_2, school_addr_line_3, school_town, school_county, school_postcode, school_email_addr, school_web_addr, school_telephone',
                                                    'fields' => array('rdcaccount_id' => 'rdcaccount_id',
                                                                      'rdcaccount_id' => 'school_id'));
    
    $this->parent_relations[]               = array('parent' => 'session',
                                                    'parent_field' => 'session_desc, session_date, examiner, session_type_id',
                                                    'fields' => array('rdcaccount_id' => 'rdcaccount_id',
                                                                      'session_id' => 'session_id'));
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Use of $this->skip_validation
Next Topic: how can i change a textfield row into dropdown control?
Goto Forum:
  


Current Time: Sun Nov 24 12:46:22 EST 2024

Total time taken to generate the page: 0.01196 seconds