Re: Not getting unique data in an iterator.
[prev]
[thread]
[next]
[Date index for 2004/07/06]
On Tue, 2004-07-06 at 10:01, Robert Creager wrote:
> When executing the following, the data retrieved through the inner ($v_iter)
> iterator is only the first row returned by the db query. $v_iter does loop the
> correct number of times (48 with my db in this specific instance), but the
> data is not changing during the loop.
Looks like your setup for TASSIV::ObsV has the wrong primary key.
> package TASSIV::ObsV;
>
> use base qw( TASSIV::DBI );
>
> __PACKAGE__->table( 'obs_v' );
> __PACKAGE__->columns( 'Primary' => 'star_id' );
> __PACKAGE__->columns( 'Others' => qw/x y mag smag file_id/ );
> __PACKAGE__->has_a( 'file_id' => 'TASSIV::Files' );
> __PACKAGE__->has_a( 'star_id' => 'TASSIV::Catalog' );
That is saying that only star_id matters when finding rows from this
table, but since it seems to be a mapping table it probably has a
multi-column primary key. If star_id is not unique in this table, then
it is not the primary key.
- Perrin
|
|
Re: Not getting unique data in an iterator.
Perrin Harkins 14:57 on 06 Jul 2004
|