Re: trouble with stringify
[prev]
[thread]
[next]
[Date index for 2005/04/25]
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)
|