Re: extra constraints on has_many relationship (patch)

[prev] [thread] [next] [Date index for 2004/10/30]

From: Cees Hek
Subject: Re: extra constraints on has_many relationship (patch)
Date: 10:54 on 30 Oct 2004
On Sat, 30 Oct 2004 10:29:48 +0100, Tony Bowden <tony-cdbitalk@xxxxx.xxx> wrote:
> On Mon, Oct 25, 2004 at 11:58:19AM +1000, Cees Hek wrote:
> > using add_to_r_rated_films will automatically fill in Rating = 'R' for
> > you, unless Rating is already passed in by the user.
> 
> I'm not entrely sure about this. In the tests you have:
> 
> +ok(
> + $director->add_to_r_rated_films(
> +   {
> +     Title    => 'Film 3',
> +     Director => 'Director 1',
> +     Rating   => 'G',
> +   }
> + ),
> + 'add_to_r_rated_films'
> +);
> 
> That just looks wrong to me. I would expect that to be a run time
> error.

I guess you are probably right.  When I wrote it, I was of the opinion
"Do what the user asks", but in the above case they should really be
using add_to_films, and we should let them know of the mistake...

The change is trivial.  Do you want me to resend the patch, or do you
just want to make the changes yourself?

Cheers,

        -- 
        Cees Hek

Re: extra constraints on has_many relationship (patch)
Cees Hek 10:54 on 30 Oct 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52