On January 5, 2011 05:07:07 pm spokra wrote:
> I'm attempting to frontend my freeradius tables with hobo.  freeradius
> has the primary key of radacctid instead of id.  and also has it set
> to auto_increment.  Being that you cant have two indexes with
> auto_increment and not wanting to muck with the freeradius code.  is
> there a way to configure my model to use radacctid instead of id as
> the primary key and auto_increment so both radius and rails/hobo can
> be happy?

I think that you want to put

          set_primary_key "radacctid" 

in your model file.  Its a Rails thing.  See:

http://wiki.rubyonrails.org/rails/pages/howtouselegacyschemas#using_set_primary_key_for_tables_whose_primary_key_was_not_called_id


By the way, have you put a:

        HoboFields::MigrationGenerator.ignore_tables = %w( radacct )

in your config/initializers/hobo.rb file (presuming your table name is 
"radacct") to prevent Hobo from trying to generate migrations for it?


Regards,
Henry

-- 
Henry Baragar
Instantiated Software

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to