--- lib/A3C/Record.pm 2008/04/01 19:27:06 54 +++ lib/A3C/Record.pm 2008/04/11 15:55:03 74 @@ -13,7 +13,8 @@ =head2 load_or_create -Perform canonicalization on C +Perform canonicalization on C and loads subset of columns +(which hopfully are indexes in model for performance reasons). =cut @@ -35,7 +36,21 @@ ); } - my ( $id, $msg ) = $self->load_by_cols(%args); + my %load_cols; + + if ( ref($self) eq 'A3C::Model::Person' ) { + + $load_cols{$_} = $args{$_} foreach ( qw/ + uid + hrEduPersonUniqueID + mail + / ); + + } else { + %load_cols = %args; + } + + my ( $id, $msg ) = $self->load_by_cols(%load_cols); unless ( $self->id ) { return $self->create(%args); }