Re: Many-to-Many with just on table plus linking table
[prev]
[thread]
[next]
[Date index for 2005/04/04]
On 4 Apr 2005, at 20:03, Brett Sanger wrote:
> I decided to finally look into Class::DBI, and I'm already quite lost.
> The
> documentation is a bit spotty and chaotically mixes low-level and
> high-level
> bits.
That's why I like it.
> <snip>
> It turns out that add_to_topics() wants a 'message' value passed, and
> add_to_messages wants a 'topic' value passed, with the result of
> switching the
> meanings of my columns. If I try to be explicit and list both values,
> it
> ignores what I passed.
That - along with the null key error message - is probably because of
the multiple-column primary key in Forum::Topic. If you add an
auto-incrementing id column to the forum_relations table and declare it
as a single primary key then everything should fit into place.
Multiple-column pk support was added to cdbi relatively late in its
life and isn't invisible or ubiquitous yet.
best
will
|
|
Re: Many-to-Many with just on table plus linking table
William Ross 21:16 on 04 Apr 2005
|