Hi, On Jan 10, 2012, at 1:32 AM, Chris Corbyn wrote:
> On 10/01/2012, at 2:22 AM, Chris Corbyn wrote: > >> We have run into this too. We assumed it was just never supposed to work >> and ended up processing the models manually, calling >> Repository#create_storage_model for each model in turn. We may have >> overlooked something though. I'll give this another go in the morning >> (2:20am here and going to bed) and will confirm if this is broken or not. >> > > Confirmed. I can't get this to work. DM seems to have a hard-coded :default > somewhere. The one I found when I was looking into this was Respository.default_name, which is called from Model#default_repository_name. I didn't find a way to change it other than subclassing the model. I also found that you can't profitably have your model make #default_respository_name a writable attribute -- it seems that it gets copied around when the models are finalized, so changing it later (e.g., to work around my auto_migrate issue) has no effect. Rhett > >> >> On 10/01/2012, at 2:17 AM, Rhett Sutphin wrote: >> >>> When I call auto_migrate in a repository block like so: >>> >>> ::DataMapper.repository(:other) do >>> ::DataMapper.auto_migrate! >>> end >>> >>> DM still applies the schema to the :default repo, not the :other repo. >>> Should I report this as a bug? > > -- > 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. > -- 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.
