Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Table name FAIL #11

Open
activestylus opened this issue Mar 2, 2011 · 1 comment
Open

Table name FAIL #11

activestylus opened this issue Mar 2, 2011 · 1 comment

Comments

@activestylus
Copy link

Given the following

class Person
  include DataMapper::Resource

  property :id,   Serial
  property :name, String

  remix n, :addresses
end

module Address
  include DataMapper::Resource

  is :remixable

  property :id,   Serial
  property :city, String
end

When I run

rake db:automigrate,

Then, instead of getting a table called person_addresses,

it's called person_addres, not at all what I expected.

Looks like a pluralization issue? So far its the only model I have with this problem.

Also no matter what I do (on any model), remix n ignores the :as key (by ignore I mean that the table names are not affected, I'm unsure if that's the intended behavior)

@activestylus
Copy link
Author

Ok I was able to fix this by using :suffix on the address module. Stil may be worth looking into the default naming of the table though

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant