[wp-trac] [WordPress Trac] #14513: Time for a wp_post_relationships table?

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 1 21:52:40 UTC 2010


#14513: Time for a wp_post_relationships table?
-----------------------------+----------------------------------------------
 Reporter:  mikeschinkel     |        Owner:          
     Type:  feature request  |       Status:  reopened
 Priority:  normal           |    Milestone:          
Component:  Post Types       |      Version:  3.0.1   
 Severity:  normal           |   Resolution:          
 Keywords:                   |  
-----------------------------+----------------------------------------------
Changes (by ploobers):

  * status:  closed => reopened
  * resolution:  wontfix =>


Comment:

 I know that there has been a lot said on the issue, and I don't think that
 there is much more to be said in terms of why this should exist. I don't
 see how this is separable from custom post types at all. If we are going
 to have potential dozens of custom post types (I have 15 in a site I am
 working on, with plans for the future implementation of another 15 or so),
 then linking them together in a one to one relationship is absolutely
 necessary.

 Without custom post types, people had to hack around using categories to
 try and simulate custom post types. It was obviously a need that was
 recognized by the WP community and addressed in 3.0. Being able to store
 connections, and even more so, to be able to store specific details about
 each connection, makes custom post types a much more flexible solution.

 In my personal case, I am developing a soccer equipment site. I have
 -Brands
 -Leagues
 -Clubs
 -Players
 -Shoes
 -Balls
 etc.

 Brands can sponsor specific leagues, clubs and/or players. That can change
 over time, so I need to store along with the connection start and end
 dates for the sponsorship. On the other hand, shoes are always going to be
 tied to one specific brand.

 Clubs can belong to multiple leagues, for example the English Premier
 League and Champions League. Those associations also potentially change
 per year.

 Players move around be between different clubs and brands, plus they also
 change which shoes they are wearing at any given point.

 That's just a small view into the current site I am building, and though I
 realize that not everyone is building that type of site, I do believe that
 over 50% of people that use custom post types will want to connect them.
 When I am viewing a brand, I want to be able to show a list of all the
 different connected post types, whether they are sponsored leagues, clubs
 or players, and also their related equipment that they manufacture.

 As scribu has shown with his Posts 2 Posts plugin, it is fairly easy to
 implement such a solution, and since most of the coding is done, almost
 trivial to integrate with the WordPress core. To ignore it or to write it
 off as an 'edge case' is simply short sighted.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14513#comment:48>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list