Support » Plugin: WP Data Access » Table parent-child relationships

  • Hi Peter,

    I’m having another issue with the same site and I can’t figure out what is going on.

    I have a n:m relationship between Courses and Students, with a Class connection table.

    I have a Courses page and a Students page. When I go to a course in Courses I have a Students child-tab, that let’s me add new students to the course, the regular way as documented in your site.

    When I go to a student in Students page, I have a Courses child-tab. But it doesn’t show the course(s) a student is enrolled in. And I’m not able to add an existing course. The option is there but when I click the button, it just reloads the screen, with no action.

    Thanks.

    Álvaro

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Alvaro,

    Can you check the relationship between Student and Class> Is this an n:m relationship? Is it using the right columns? This usually happens if one of your relationships is not correctly defined.

    PLease let me know if this helps,
    Peter

    Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    Hi Peter,

    So, I have 3 tables:

    contacts > ID (related column)
    class > ID, course_id
    course > course_id

    In course Project Template I have:

    Type = n:m
    Source column name = course_id
    Target table name = class
    Target column name = course_id
    Relation table name (only n:m) = contacts

    This let’s me add students to courses. I’ve confirmed that the DB table is populated.

    In contacts (the table for students) Project Template I have:

    Type = n:m
    Source column name = ID
    Target table name = class
    Target column name = ID
    Relation table name (only n:m) = course

    Should this be different?

    Thanks.
    Álvaro

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Alvaro,

    This looks correct! Are both pages defined as parent-child pages? Can you check that?

    Can you give me temporary access to your dashboard? You can use the contactform on the plugin website to send it in private.

    Thanks,
    Peter

    Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    Hi Peter,

    Yes, I’ve confirmed that both pages are defined as parent-child pages.

    I can give you temporary access, but will you be able to move around? It’s all in Portuguese… maybe if I change the language and include some kind of walkthrough in the email, what do you think?

    Thanks.
    Álvaro

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Alvaro,

    I don’t understand any Portuguese 😊 but it should be possible to switch th euser language to English. We can give it a try…

    Thanks,
    Peter

    Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    I’ll send you the login and a small guide to the data tomorrow morning.

    Thanks,
    Álvaro

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Table parent-child relationships’ is closed to new replies.