A general implementation question

Hi
    I have the models ServiceDesk and Problem .A servicedesk can be
related to other service desk and problems .Similarly a problem can be
related to other problem and servicedesks .At the first stage when
doing service desk module I solved the servicedesk related records with
the table
service_desk_related records with fields
id
service_desk_id | integer |
related_record_id | integer |
related_record_model | character varying(80) | default
NULL::character varying
related_record_association_type_id | integer |

     For example
1 12 Problem 4
2 15 ServiceDesk 3
                 So now I have problem module started..So my question
is shud i create a table name problem_related_records as of fields above
or is there any other easy solution for this

Thanks in advance
Sijo

Hi
   I have the models ServiceDesk and Problem .A servicedesk can be
related to other service desk and problems .Similarly a problem can be
related to other problem and servicedesks .At the first stage when
doing service desk module I solved the servicedesk related records
with
the table
service_desk_related records with fields
id
service_desk_id | integer |
related_record_id | integer |
related_record_model | character varying(80) | default
NULL::character varying
related_record_association_type_id | integer |

    For example
1 12 Problem 4
2 15 ServiceDesk 3
                So now I have problem module started..So my question
is shud i create a table name problem_related_records as of fields
above
or is there any other easy solution for this

Seems like you've reinvented polymorphic associations :slight_smile:

Fred