Revision b7cd46a2
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
scripts/rose_auto_create_model.pl | ||
---|---|---|
93 | 93 |
my $file = "SL/DB/${package}.pm"; |
94 | 94 |
|
95 | 95 |
$schema = <<CODE if $schema; |
96 |
__PACKAGE__->meta->schema('$schema');
|
|
96 |
__PACKAGE__->meta->schema('$schema'); |
|
97 | 97 |
CODE |
98 | 98 |
|
99 | 99 |
my $definition = eval <<CODE; |
... | ... | |
102 | 102 |
use base qw(SL::DB::Object); |
103 | 103 |
|
104 | 104 |
__PACKAGE__->meta->table('$table'); |
105 |
$schema |
|
105 |
$schema
|
|
106 | 106 |
__PACKAGE__->meta->auto_initialize; |
107 | 107 |
|
108 | 108 |
__PACKAGE__->meta->perl_class_definition(indent => 2); # , braces => 'bsd' |
... | ... | |
137 | 137 |
use SL::DB::MetaSetup::${package}; |
138 | 138 |
|
139 | 139 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
140 |
$schema |
|
140 | 141 |
__PACKAGE__->meta->make_manager_class; |
141 | 142 |
|
142 | 143 |
1; |
Auch abrufbar als: Unified diff
rose_auto_create_model.pl: Datenbankschema auch in SL/DB/...pm hinterlegen