On Jan 21, 10:03 pm, Pedro Bernardes <[email protected]> wrote:
> Hi, I'm new to this list and to rails, so I'm sorry if this subject is
> repetead or too obvious.
>
> I have two models: Topic and University, both in production. I want to make
> University to inherit from Topic, but when I do this:
>
>       University < Topic
>
> My universities data just disapear (and reapears if the changes are undone).
>

Are you trying to setup a single table inheritance type thing? When
you say that your universities data disappears, do you mean that
University.all no longer returns any data?
Switching from your previous setup to a single table inheritance
situation means that mongomapper will be looking in the topics
collection when you do University.all, so I'm not surprised that your
university data would appear to vanish, if you haven't done anything
to move it from its previous collection.

Fred


> I'm using mongomapper and mongodb. The code is pretty big sp I'll post then
> only if necessarily. I think this must be easy to solve.
>
> ps: I've tried the deprecated _type but didn't work.
>
> Thanks !

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to