Fix container date source with non-unique contents
authorJeff Godin <jgodin@tadl.org>
Thu, 22 May 2014 20:55:31 +0000 (16:55 -0400)
committerJeff Godin <jgodin@tadl.org>
Tue, 7 Apr 2015 16:29:57 +0000 (12:29 -0400)
commitd48ad7422efac6ec1c1ec39362aadcd7dee5a738
tree73967b13bf9f75920a7a58fcea10b404fa34efbf
parent2712737419506dedb046ab75cc8a4de589f5c243
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