Re: Can we make might_have() relationships easier to use?

[prev] [thread] [next] [Date index for 2004/06/04]

From: Edward J. Sabol
Subject: Re: Can we make might_have() relationships easier to use?
Date: 15:06 on 04 Jun 2004
>> Ideally, I think "$cd->bar('some value');" should transparently create the
>> other record if necessary.
> Can you give a failing test case against 0.96?

I can't upgrade to 0.96 at this time, but I did download it and did some
tests. I think it works fine. I tweaked Blurb.pm in t/testlib, like so:

--- Blurb.pm.orig  Sun Apr 25 11:33:36 2004
+++ Blurb.pm    Fri Jun  4 10:44:17 2004
@@ -21,7 +21,7 @@
        $class->db_Main->do(
                qq{
      CREATE TABLE Blurbs (
-        title                   VARCHAR(255) PRIMARY KEY,
+        title                   VARCHAR(255) NOT NULL PRIMARY KEY,
         blurb                   VARCHAR(255) NOT NULL
     )
   }

0.95 fails 9/18 tests in 14-might_have.t when you do that, but 0.96 passes
with flying colors. Still, please tweak Blurb.pm so there is no regression in
the future.

I'd still like to discuss adding an "add_*" method for has_many()
relationships, similar to has_many()'s "add_to_*" method. Any interest there?

Later,
Ed

(message missing)

Can we make might_have() relationships easier to use?
Edward J. Sabol 06:04 on 04 Jun 2004

Re: Can we make might_have() relationships easier to use?
Edward J. Sabol 15:06 on 04 Jun 2004

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