move get_tables back into Meta/Class. Refactor it to use get_all_class_metas instead of iterating over all the properties.
This commit is contained in:
parent
15c5318a27
commit
49992dddb9
2 changed files with 20 additions and 21 deletions
|
|
@ -95,25 +95,4 @@ An integer, representing how difficult the Asset will be to use. The default ui
|
|||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 get_tables ( )
|
||||
|
||||
Returns an array of the names of all tables in every class used by
|
||||
this Class.
|
||||
|
||||
=cut
|
||||
|
||||
sub get_tables {
|
||||
my $self = shift;
|
||||
my @properties = ();
|
||||
my %seen = ();
|
||||
push @properties,
|
||||
grep { ! $seen{$_}++ }
|
||||
map { $_->tableName }
|
||||
$self->get_all_properties
|
||||
;
|
||||
return @properties;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -124,6 +124,26 @@ sub get_property_list {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 get_tables ( )
|
||||
|
||||
Returns an array of the names of all tables in every class used by this class.
|
||||
|
||||
=cut
|
||||
|
||||
sub get_tables {
|
||||
my $self = shift;
|
||||
my @properties = ();
|
||||
my %seen = ();
|
||||
push @properties,
|
||||
grep { ! $seen{$_}++ }
|
||||
map { $_->tableName }
|
||||
$self->get_all_class_metas
|
||||
;
|
||||
return @properties;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 property_meta ( )
|
||||
|
||||
Returns the name of the class for properties.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue