Uploaded image for project: 'mod-circulation-storage'
  1. mod-circulation-storage
  2. CIRCSTORE-118

Usage of _id and jsonb->>'id'

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Won't Do
    • None
    • None
    • Core: Platform

    Description

      Check that _id and jsonb->>'id' are always the same so that the optimization in cql2pg works.
      Fix it if not.

      The table's primary key _id has to match jsonb->>'id', otherwise cql2pg's id optimization won't work:
      https://github.com/folio-org/cql2pgjson-java/tree/master/cql2pgjson#id

      Use populateJsonWithId in the schema.json:
      https://github.com/folio-org/raml-module-builder/blob/v23.11.0/README.md#the-post-tenant-api
      This will create a trigger that always copies _id into jsonb->>'id': https://github.com/folio-org/raml-module-builder/blob/v23.11.0/domain-models-runtime/src/main/resources/templates/db_scripts/populate_id.ftl

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases