Ok, I think I've solved my problem... in cases where model A remixes
module B with a :for option that is itself a remix of module C into
model D, I just moved the declaration of A from a.rb into d.rb,
_after_ the declaration of A. Everything seems to be working.


On May 5, 8:56 pm, MarkMT <[email protected]> wrote:
> This is still a tentative diagnosis, but I think the explanation for
> my problem is the following...
>
> In both cases of remix that I mentioned, the :for model is itself
> another remixed model. It looks like this third remix is defined
> before one of the first two, but after the other. So in the second
> case the :for model doesn't exist at the point where the m2m
> relationship is being defined and it fails to complete.
>
> If this is correct, it would be good if an exception were raised in
> such cases. But more importantly, is there a way to control the order
> in which models are loaded?
>
> Mark.
>
> On May 4, 10:49 pm, MarkMT <[email protected]> wrote:
>
> > > I guess I can create the missing columns manually on the production
> > > machine using phpmyadmin, but it would be nice to know why the table
> > > isn't generated correctly to start with.
>
> > Doesn't look like this is a viable solution. The problem is not just
> > the absence of the FK columns in the table, but also the absence of
> > the association methods that are supposed to be created. I have
> > confirmed that they are not present.
>
> > However another clue... when I run bin/merb -i on the deployment
> > server, I get the following  warning message for the model that's
> > giving me trouble -
>
> >  ~ /var/www/apps/merb/craw/releases/20090504205549/gems/gems/dm-is-
> > remixable-0.9.11/lib/dm-is-remixable/is/remixable.rb:200 warning:
> > already remixed constant UserMembershipLineItem
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to