[bbDev] bbPress meta data storage

David Chait davebytes at comcast.net
Thu Nov 16 16:09:57 GMT 2006


I'd look at use-case scenarios for both apps.  I'd guess there's a fair 
number of WP plugins that depend upon having multiple meta entries with 
duplicate keys -- I've written them before, and I've seen (and in cases 
modified) others' plugins that do the same.  In most cases I've used the 
post_custom accessor functions, but there are cases I've seen where there 
were missing functions (get all key X from post Y, outside post loop... 
which could be optimized further with pre-cache all key X for-each in 
{a,b,c,d}).

Part of the niceness of multiple keys was the simplicity of the Post 
interface for doing so, being able to have users add multiple fields with 
the same key.  If you're saying that you'll retain that ability, and under 
the covers transparently save and retrieve the multiple keys, that's fine by 
me!  But, then I'd suggest 'expanding' the accessor functions to handle more 
cases of retrieving the meta table data -- easier to tell someone a function 
to use instead of 'standard' custom query, than to tell them how to modify 
custom queries. ;)

But yes, it also makes it difficult to then do queries based on say the 
number of a given key for a given post, sorting the entire post list by that 
count.

Comes down to whether you want meta to be flexible so that people don't 
create their own tables for trickier stuff, or simple and fast for say 50% 
of the cases (being pessimistic there!).

-d

----- Original Message ----- 
From: "Matt Mullenweg" <m at mullenweg.com>
To: "bbPress Development" <bbdev at lists.bbpress.org>
Sent: Thursday, November 16, 2006 10:10 AM
Subject: Re: [bbDev] bbPress meta data storage


> Dougal Campbell wrote:
>> I even wonder how much trouble it would cause if we made a similar
>> change in WP. We could make the upgrade process check for duplicate keys
>> and combine them into a single key with a serialized array value, then
>> modify the API functions to change how they access the data, while
>> maintaining the old data structures.
>
> Would you be up for working on that patch for WP? It'd be nice to unify bb 
> and WP, and make both cleaner.
>
> -- 
> Matt Mullenweg
>  http://photomatt.net | http://wordpress.org
> http://automattic.com | http://akismet.com
> _______________________________________________
> bbDev mailing list
> bbDev at lists.bbpress.org
> http://lists.bbpress.org/mailman/listinfo/bbdev
> 



More information about the bbDev mailing list