Re: Problem with empty has_a

[prev] [thread] [next] [Date index for 2005/05/20]

From: merlyn (Randal L. Schwartz)
Subject: Re: Problem with empty has_a
Date: 12:20 on 20 May 2005
>>>>> "Thomas" == Thomas Klausner <domm@xxx.xx> writes:

Thomas> Here's what I'm trying to do:

Thomas> - I have a bunch of events.
Thomas> - I have another bunch of publications.
Thomas> - A publication might be releated to a single event (e.g. a paper of a
Thomas>   presentation given at an event).
Thomas> - An event might have several publications releated to it.
Thomas> - Provide links between both events and publications.

Thomas> My initial plan was:

Thomas> My::Publication->has_a(event=>'My::Event');
Thomas> My::Event->has_many(publications=>'My::Publications'=>'event');

Thomas> This worked, but every publication had an empty event (as in my original
Thomas> posting)

Well, this should permit event => undef as well as event => $some_event.
Are you sure you had an "empty" event, and just an undef?

The underlying table permits NULLs there, right?

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Problem with empty has_a
Thomas Klausner 19:34 on 19 May 2005

Re: Problem with empty has_a
Tony Bowden 21:01 on 19 May 2005

Re: Problem with empty has_a
Thomas Klausner 07:05 on 20 May 2005

Re: Problem with empty has_a
Thomas Klausner 07:39 on 20 May 2005

Re: Problem with empty has_a
merlyn (Randal L. Schwartz) 12:20 on 20 May 2005

Re: Problem with empty has_a
Tony Bowden 12:33 on 20 May 2005

Re: Problem with empty has_a
Perrin Harkins 13:43 on 20 May 2005

Generated at 15:51 on 25 May 2005 by mariachi v0.52