I a have the following datamapper ressource :
class Job
include DataMapper::Resource
storage_names[:default] = 'job'
property :id, Serial
property :at, Integer, :required => true, :min => 0
property :name, Float, :required => true, :default => 0
property :cpu, Float, :required => true, :default => 0
property :memory, Float, :required => true, :default => 0
end
When do :
DataMapper.auto_migrate!
The table 'job' is correctly created in the database. But when I do :
Job.create(
:at => entry[:timestamp],
:name => process.to_s,
:cpu => data[0],
:memory => data[1]
)
Nothing is really inserted in the 'job' database table. (Nothing in datamapper log too)
Any idea ?