Add defaults for lastUpdated, dateCreated. Crud data now has to be manually written to the db.
This commit is contained in:
parent
6686860b08
commit
b4abac9a40
2 changed files with 12 additions and 2 deletions
|
|
@ -32,12 +32,21 @@ has session => (
|
|||
|
||||
has lastUpdated => (
|
||||
is => 'rw',
|
||||
lazy => 1,
|
||||
builder => '_now';
|
||||
);
|
||||
|
||||
has dateCreated => (
|
||||
is => 'rw',
|
||||
lazy => 1,
|
||||
builder => '_now';
|
||||
);
|
||||
|
||||
sub _now {
|
||||
my $self = shift;
|
||||
return WebGUI::DateTime->new($session)->toDatabase;
|
||||
}
|
||||
|
||||
has sequenceNumber => (
|
||||
is => 'rw',
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue