Subject: | Rose::DB::Object::Tutorial bug |
Date: | Fri, 30 May 2014 08:42:29 -0400 |
To: | bug-Rose-DB-Object [...] rt.cpan.org |
From: | "Matthew Horsfall (alh)" <wolfsage [...] gmail.com> |
Howdy,
Rose::DB::Object::Tutorial can't decide on precision vs scale.
There is this, which looks correct:
price =>
{
type => 'decimal',
precision => 10,
scale => 2,
not_null => 1,
default => 0.00
},
And then in the My::* variants, it's used like this:
columns =>
[
id => { type => 'integer', not_null => 1 },
name => { type => 'varchar', length => 255,
not_null => 1 },
price => { type => 'numeric', default => '0.00',
not_null => 1, precision => 2, scale => 10 },
I believe the first form is correct and the second form is incorrect.
These should be fixed across the entire document.
Thanks,
-- Matthew Horsfall (alh)