Re: trouble with stringify

[prev] [thread] [next] [Date index for 2005/04/25]

From: Perrin Harkins
Subject: Re: trouble with stringify
Date: 05:10 on 25 Apr 2005
On Sun, 2005-04-24 at 21:53 -0700, Randal L. Schwartz wrote:
> But you bingo'ed too early.  I don't have a has_a on my primary key.
> I have a has_a on a *part* of my primary key.

It's not a relevant difference to CDBI in this case.

> If that's also forbidden, then the docs need to be changed,
> because that would also break all linking tables that don't
> include an "artificial" id column.

It does break them, *if* you include has_a relations on them and try to
set their primary key columns with strings instead of objects.

You may be running into a slightly different version of this bug than I
saw, but I suspect it's the same thing.  In my case, I would create a
new object whose definition includes a has_a on part of its primary key,
and then calls to the accessor with the has_a would give me the string
rather than the object.  Undef'ing the object and re-fetching it would
make the has_a work, but I couldn't take that chance of forgetting to do
that so I just got rid of the has_a and made my own accessor for the
linked object.

> I suspect it's a bug, but I'm looking for someone who knows better
> than me that it's a bug.

I'm pretty sure it's a bug.

- Perrin

(message missing)

trouble with stringify
merlyn (Randal L. Schwartz) 23:56 on 24 Apr 2005

Re: trouble with stringify
Perrin Harkins 01:09 on 25 Apr 2005

Re: trouble with stringify
merlyn (Randal L. Schwartz) 04:53 on 25 Apr 2005

Re: trouble with stringify
Perrin Harkins 05:10 on 25 Apr 2005

Re: trouble with stringify
merlyn (Randal L. Schwartz) 05:15 on 25 Apr 2005

Re: trouble with stringify
Perrin Harkins 05:24 on 25 Apr 2005

Re: trouble with stringify
merlyn (Randal L. Schwartz) 05:26 on 25 Apr 2005

Re: trouble with stringify
Tony Bowden 08:46 on 25 Apr 2005

Generated at 09:29 on 27 Apr 2005 by mariachi v0.52