bumpspowdersteeps
2007-Mar-26 18:52 UTC
Boolean with mysql as tinyint,but set true value as ''-1''
Hello, We are developing a rails application, migrated from an Access front end with sqlserver backend to a rails, mysql project, but we still would like the Access front end to be able to connect to the mysql database and use the application through both methods of connection. Have converted the SQL servers boolean types to tinyint(1) for the MySQL and rails,but turns out the old MS Access front end needs ''TRUE'' to be a value of ''-1'' in order for its checkboxes to work. On the MySQL we have set 0- for false, and 1 for True, which works great for Rails out of the box, but... Is there any way in a rails model declaration to have active record store and understand ''-1'' as ''TRUE'' rather than ''1'' as ''TRUE'' ???? Thanks Jason --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---