bosko / rmre

Rails 3 models reverse engineering
MIT License
126 stars 36 forks source link

Classes generated are empty #26

Closed RyanGannon closed 9 years ago

RyanGannon commented 9 years ago

After running rmre -a mysql2 -s myhost -d mydbname -u myuser -p mypassword -o temp I get files for each table, all correctly named, but none of the columns are listed.

class Branch < ActiveRecord::Base

end

My versions; Rails 4.2.1 ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]

bosko commented 9 years ago

ActiveRecord does not need columns. It reads table structure in run time and constructs methods needed to access column values. If you do not have foreign keys in the database you will get empty class files.

RyanGannon commented 9 years ago

Then I misunderstood this. Sorry.