Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 12 Apr 2016 13:18:20 +0000 (15:18 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 10:26:04 +0000 (10:26 +0000)
commit43902cf42dab7b56f9215b5c51e4ac8e51fd62c8
tree8b6f07bd37e5d216bbcd17c88fd361255677da68
parentfc81ee50040076ba6417cd047ea72c9ced7a1414
Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved

Adding reserves.itemtype made a query to fail in CanItemBeReserved.
This patch prefixes the column names with the corresponding table names
to prevent that.

You can trigger the error by running
  prove t/db_dependent/Holds.t

You should see something like this:
  Column 'itemtype' in where clause is ambiguous

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Reserves.pm