Skip Navigation

[Resolved] Cannot find the parent child relationship in database

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to find the information about post relationships in the postmeta table of the database.

Solution: The new post relationships system stores information in proprietary tables, not in postmeta.

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by sachaB 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1216945

I am trying to:
Download the MySQL database and search the parent/child meta key

Link to a page where the issue can be seen:

I expected to see:
the meta key "_toolset_associations_vrs-adjuster-licensee"

Instead, I got:
I search the database for "_toolset_associations_" and no result is returned.
The strange thing is that if I export the child custom post type, I can see it in the pos meta.

I need to export the database table with the corresponding relationship meta key.

#1217308

In the new post relationship system, the post relationship isn't actually stored in postmeta. Toolset creates some proprietary tables that contain information about post relationships, specifically wp_toolset_relationships and wp_toolset_associations. If your site was created before the new post relationships system, you might still see some of the old _wpcf_belongs_{slug}_id information in postmeta, but it's not reliable anymore.

Can you tell me more about what you want to do with this information? I might be able to suggest a better way to access it in the database. For example, you could use the post relationships API in PHP.

#1218776

My issue is resolved now. Thank you!
The information provided answered my question.