Re: extra constraints on has_many relationship (patch)

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

From: Tony Bowden
Subject: Re: extra constraints on has_many relationship (patch)
Date: 09:29 on 30 Oct 2004
On Mon, Oct 25, 2004 at 11:58:19AM +1000, Cees Hek wrote:
> OK, here is an updated patch that includes tests.  I have also
> expanded the patch slightly, so that the add_to_ method will "Do the
> Right Thing".   

Excellent! Thanks.

> 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.

Tony

Re: extra constraints on has_many relationship (patch)
Tony Bowden 09:29 on 30 Oct 2004

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