Fix container date source with non-unique contents tadl/rel_2_5_1
authorJeff Godin <jgodin@tadl.org>
Thu, 22 May 2014 20:55:31 +0000 (16:55 -0400)
committerJeff Godin <jgodin@tadl.org>
Thu, 22 May 2014 20:55:31 +0000 (16:55 -0400)
commit6a2c17e4b7f2c23e4ce6c51862f002f5e6056520
treeee3448badea946259243d3965aaa0de63c9287a9
parent774b9857e6c7d5f715b09393c79196d018623f4c
Fix container date source with non-unique contents

It is possible for a bre container to have multiple items pointing
to the same bib. In these cases, a container_date sort attempt would
fail with:

ERROR:  more than one row returned by a subquery used as an
expression

This fix considers only a single date, the most recent time a given
bib was added to the container.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm