Re: [CDBI] has_many self reference
[prev]
[thread]
[next]
[Date index for 2006/03/01]
On 01/03/06, Aaron Trevena <aaron.trevena@xxxxx.xxx> wrote:
> I believe this problem occurs in C::DBI rather than in or because of
> AutoLoader.. There is a bug on rt (
> http://rt.cpan.org/Public/Bug/Display.html?id=3D3305 ) describing a very
> similar problem to what I have, with this same error message.
>
> In my case I have several classes, but 1 fails to compile with 3.014,
> but works fine in 0.9x.
>
> I have 2 relevent classes - Task and TaskHistory..
>
> TaskHistory has a Task on the TaskHistory task column
> Task has many TaskHistory on the TaskHistory task column
> Task has a last TaskHistory on the Task last_history column
>
> When compiling with latest CDBI get the following error :
> can't load Schedule::Chronic::Distributed::Task: Can't locate object
> method "meta_info" via package
> "Schedule::Chronic::Distributed::TaskHistory" at
> /usr/local/share/perl/5.8.4/Class/DBI/Relationship/HasMany.pm line 34.
>
> I'm guessing that the new has_many code doesn't like me having both a
> has_a and a has_many from one class to another, which is rather
> unhelpful, removing the extra has_a relationship isn't a particular
> hardship in this case but it does show a limitation in the new code
> that isn't documented.
I've updated the rt entry with both of the files concerned, and also
confirmed that removing the 3rd relationship stops the error from
occuring.
A.
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi