forked from ollyg/Catalyst-Plugin-AutoCRUD
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add hyperlink icon from any FK to the related table+record * Support DBIC Dynamic Default components such as DBIx::Class::TimeStamp [ENHANCEMENTS] * Display alert message when table data load fails (Getty) * Implement separate create() and update() in DBIC backend (davewood) [BUG FIXES] * Fix for hidden table configuration (F. Elliott) * Fix for when m2m gets generated with same name as existing rel
- Loading branch information
Showing
46 changed files
with
632 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package DemoAppOtherFeaturesSchema::Result::A; | ||
|
||
# Created by DBIx::Class::Schema::Loader | ||
# DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use base 'DBIx::Class::Core'; | ||
|
||
|
||
=head1 NAME | ||
DemoAppOtherFeaturesSchema::Result::A | ||
=cut | ||
|
||
__PACKAGE__->table("a"); | ||
|
||
=head1 ACCESSORS | ||
=head2 id | ||
data_type: 'integer' | ||
is_auto_increment: 1 | ||
is_nullable: 0 | ||
=head2 reference | ||
data_type: 'integer' | ||
is_foreign_key: 1 | ||
is_nullable: 1 | ||
=cut | ||
|
||
__PACKAGE__->add_columns( | ||
"id", | ||
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, | ||
"reference", | ||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, | ||
); | ||
__PACKAGE__->set_primary_key("id"); | ||
|
||
=head1 RELATIONS | ||
=head2 reference | ||
Type: belongs_to | ||
Related object: L<DemoAppOtherFeaturesSchema::Result::Reference> | ||
=cut | ||
|
||
__PACKAGE__->belongs_to( | ||
"reference", | ||
"DemoAppOtherFeaturesSchema::Result::Reference", | ||
{ id => "reference" }, | ||
{ | ||
is_deferrable => 1, | ||
join_type => "LEFT", | ||
on_delete => "CASCADE", | ||
on_update => "CASCADE", | ||
}, | ||
); | ||
|
||
=head2 bs | ||
Type: has_many | ||
Related object: L<DemoAppOtherFeaturesSchema::Result::B> | ||
=cut | ||
|
||
__PACKAGE__->has_many( | ||
"bs", | ||
"DemoAppOtherFeaturesSchema::Result::B", | ||
{ "foreign.a" => "self.id" }, | ||
{ cascade_copy => 0, cascade_delete => 0 }, | ||
); | ||
|
||
|
||
# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-15 14:58:19 | ||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XLBJfiY2TVbu0hULuLKzTw | ||
|
||
|
||
# You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
1; |
100 changes: 100 additions & 0 deletions
100
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/B.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package DemoAppOtherFeaturesSchema::Result::B; | ||
|
||
# Created by DBIx::Class::Schema::Loader | ||
# DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use base 'DBIx::Class::Core'; | ||
|
||
|
||
=head1 NAME | ||
DemoAppOtherFeaturesSchema::Result::B | ||
=cut | ||
|
||
__PACKAGE__->table("b"); | ||
|
||
=head1 ACCESSORS | ||
=head2 id | ||
data_type: 'integer' | ||
is_auto_increment: 1 | ||
is_nullable: 0 | ||
=head2 a | ||
data_type: 'integer' | ||
is_foreign_key: 1 | ||
is_nullable: 1 | ||
=head2 reference | ||
data_type: 'integer' | ||
is_foreign_key: 1 | ||
is_nullable: 1 | ||
=cut | ||
|
||
__PACKAGE__->add_columns( | ||
"id", | ||
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, | ||
"a", | ||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, | ||
"reference", | ||
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, | ||
); | ||
__PACKAGE__->set_primary_key("id"); | ||
|
||
=head1 RELATIONS | ||
=head2 reference | ||
Type: belongs_to | ||
Related object: L<DemoAppOtherFeaturesSchema::Result::Reference> | ||
=cut | ||
|
||
__PACKAGE__->belongs_to( | ||
"reference", | ||
"DemoAppOtherFeaturesSchema::Result::Reference", | ||
{ id => "reference" }, | ||
{ | ||
is_deferrable => 1, | ||
join_type => "LEFT", | ||
on_delete => "CASCADE", | ||
on_update => "CASCADE", | ||
}, | ||
); | ||
|
||
=head2 a | ||
Type: belongs_to | ||
Related object: L<DemoAppOtherFeaturesSchema::Result::A> | ||
=cut | ||
|
||
__PACKAGE__->belongs_to( | ||
"a", | ||
"DemoAppOtherFeaturesSchema::Result::A", | ||
{ id => "a" }, | ||
{ | ||
is_deferrable => 1, | ||
join_type => "LEFT", | ||
on_delete => "CASCADE", | ||
on_update => "CASCADE", | ||
}, | ||
); | ||
|
||
|
||
# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-15 14:58:19 | ||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MR5vRo2hETq1evS/7tVQtQ | ||
|
||
|
||
# You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
1; |
64 changes: 64 additions & 0 deletions
64
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/DynamicDefault.pm.off
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package DemoAppOtherFeaturesSchema::Result::DynamicDefault; | ||
|
||
# Created by DBIx::Class::Schema::Loader | ||
# DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use base 'DBIx::Class::Core'; | ||
__PACKAGE__->load_components(qw( TimeStamp )); | ||
|
||
=head1 NAME | ||
|
||
DemoAppOtherFeaturesSchema::Result::DynamicDefault | ||
|
||
=cut | ||
|
||
__PACKAGE__->table("dynamic_default"); | ||
|
||
=head1 ACCESSORS | ||
|
||
=head2 id | ||
|
||
data_type: 'integer' | ||
is_auto_increment: 1 | ||
is_nullable: 0 | ||
|
||
=head2 name | ||
|
||
data_type: 'varchar' | ||
is_nullable: 0 | ||
size: 100 | ||
|
||
=head2 on_create | ||
|
||
data_type: 'datetime' | ||
is_nullable: 1 | ||
|
||
=head2 on_create_and_update | ||
|
||
data_type: 'datetime' | ||
is_nullable: 1 | ||
|
||
=cut | ||
|
||
__PACKAGE__->add_columns( | ||
"id", | ||
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, | ||
"name", | ||
{ data_type => "varchar", is_nullable => 0, size => 100 }, | ||
"on_create", | ||
{ data_type => "datetime", is_nullable => 1, set_on_create => 1 }, | ||
"on_create_and_update", | ||
{ data_type => "datetime", is_nullable => 1, set_on_create => 1, set_on_update => 1 }, | ||
); | ||
__PACKAGE__->set_primary_key("id"); | ||
|
||
|
||
# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-16 09:27:14 | ||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MhUVm6g6+/Lu2dNhNtbSMQ | ||
|
||
|
||
# You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
1; |
Oops, something went wrong.