Commit b5b2c6e
LP#2097281: Fix for last_captured_hold Item link
A new source, alhr (action.last_hold_request), was created in commit
5b4b700 and was linked from the item table (asset.copy).
Unfortunately, there was a misunderstanding about what the various
reltype values are used for, and the incorrect one was used here.
This commit changes the reltype to "might_have" so that the correct SQL
joins can be created by the reporter, and so that fleshing requests for
this field can be performed correctly by the C-based storage services.
Reports based on this link from Item (acp) to Last Captured Hold (alhr)
will have to be recreated, as the reltype value is used to build the
core template join tree.
For reference, the three reltype values and their uses are:
* has_a - the field on the class holding the link is backed by an
actual column on class's the table. There is only every one object
present through "has_a" linked fields.
* has_many - the field on the class (the local class) holding the link
is a virtual field, is not backed by an actual column on the table,
but instead describes a relationship where the foreign class holds a
field (and has a real table column) that points back to this class
using the primary key value of the specific, local object. There can
be multiple foreign objects pointing to the local object, and
therefore the data is always represented as an array when fleshed.
* might_have - just like "has_many", where the field on the local class
is not backed by an actual table column, but instead the foreign
class points to it using the local primary key. Unlike "has_many",
there will only every be one foreign object pointing to the local
object, so when fleshed the content of the virtual field is never an
array of objects, but either one specific object or NULL.
To test:
1) Attempt to run a report based on a template that goes through the
last_captured_hold link
2) See that it fails due to a join on a column that does not exist.
2) Fully install the updated IDL
3) Repeat (1); see that the report does not fail
Release-note: Fixes reporting source Item's link for last captured hold
Co-authored-by: Steven Callender <[email protected]>
Signed-off-by: Steven Callender <[email protected]>
Signed-off-by: Mike Rylander <[email protected]>
Signed-off-by: Galen Charlton <[email protected]>1 parent 43da6b1 commit b5b2c6e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8240 | 8240 | | |
8241 | 8241 | | |
8242 | 8242 | | |
8243 | | - | |
| 8243 | + | |
8244 | 8244 | | |
8245 | 8245 | | |
8246 | 8246 | | |
| |||
0 commit comments