quickArray returns 1 row, buildArray returns all rows

This commit is contained in:
Colin Kuskie 2010-06-11 10:48:11 -07:00
parent b74d21102c
commit 2c1e2b9d3e

View file

@ -1592,13 +1592,12 @@ sub resetGroupFields {
my $session = $self->session;
my $db = $session->db;
my $config = $session->config;
my $assets = $config->get('assets');
my $tableCache = {};
##Note, I did assets in SQL instead of using the API because you would have to
##instanciate every version of the asset that used the group. This should be much quicker
ASSET: foreach my $asset ( $db->quickArray('SELECT DISTINCT className FROM asset') ) {
my $definition = WebGUI::Pluggable::instanciate($asset, 'definition', [$session]);
ASSET: foreach my $assetClass ($db->buildArray('SELECT DISTINCT className FROM asset')) {
my $definition = WebGUI::Pluggable::instanciate($assetClass, 'definition', [$session]);
SUBDEF: foreach my $subdef (@{ $definition }) {
next SUBDEF if exists $tableCache->{$subdef->{tableName}};
PROP: while (my ($fieldName, $properties) = each %{ $subdef->{properties} }) {