Displaying 1 result from an estimated 1 matches for "medication_doses".
Did you mean:
medication_dose
2006 May 17
10
HABTM << producing incorrect insert sql ?
...''medication_dose_frequencies''
end
class MedicationDoseFrequency < ActiveRecord::Base
belongs_to :medication_dose
belongs_to :medication_frequency
end
class MedicationFrequency < ActiveRecord::Base
has_many :medication_dose_frequencies
end
DDL
------
CREATE TABLE `medication_doses` (
`id` int(11) NOT NULL auto_increment,
`medication_id` int(11) default NULL,
`amount` varchar(20) default NULL,
`kind` int(11) default NULL,
PRIMARY KEY (`id`)
)
CREATE TABLE `medication_dose_frequencies` (
`id` int(11) NOT NULL auto_increment,
`medication_frequency_id` int...