Fix container_date sort with non-unique contents user/jeff/container_date_sort
authorJeff Godin <jgodin@tadl.org>
Thu, 22 May 2014 20:36:48 +0000 (16:36 -0400)
committerJeff Godin <jgodin@tadl.org>
Thu, 22 May 2014 20:36:48 +0000 (16:36 -0400)
commitfba100e01e053945a02b719d50ad7d49453f34d7
treebac7a1ca18d60bbb89787366c8a017027b648095
parent79470a598abbc05a6ae3f5c6755dfc4df016219a
Fix container_date sort 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