[prev in list] [next in list] [prev in thread] [next in thread]
List: mtos-dev
Subject: Re: [MTOS-dev] Best practice for adding metadata to existing objects
From: Michael Thomsen <mikerthomsen () gmail ! com>
Date: 2009-12-04 21:02:00
Message-ID: 22bb517f0912041302y24826db3h4efdeb99009b2731 () mail ! gmail ! com
[Download RAW message or body]
I got it working by following the example in ActionStreams
(Init.pm/init_app callback), but the question still stands on what is
the recommended approach to doing this. Is there a way to do all of
that from YAML?
On Fri, Dec 4, 2009 at 3:33 PM, Michael Thomsen <mikerthomsen@gmail.com> wrote:
> Any tips on what the best approach for adding metadata to existing
> objects is? I'm trying to add 5 metadata columns to MT::Entry this
> way:
>
> sub add_meta_to_entries_object
> {
> # use MT::Entry;
> # MT::Entry::install_meta({
> # columns => [
> # qw(
> # pingfm_services_pinged
> # pingfm_pinged_blogs
> # pingfm_pinged_images
> # pingfm_pinged_microblogs
> # pingfm_pinged_statuses
> # )
> # ],
> # });
> my ($entry) = @_;
> $entry->meta(pingfm_services_pinged => '', pingfm_pinged_blogs => 0,
> pingfm_pinged_images => 0, pingfm_pinged_microblogs => 0,
> pingfm_pinged_statuses => 0);
> $entry->save();
> }
>
> Neither that, nor the commented out code actually added those columns.
>
_______________________________________________
MTOS-dev mailing list
MTOS-dev@sixapart.com
http://www.sixapart.com/mailman/listinfo/mtos-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic