WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

services: provide base class for DB-only based entities #583

@slint

Description

@slint
  • We currently have a base RecordService class that assumes "Record-like" models backed by both the DB as a primary store for item read/write operations and OpenSearch indices for all list/search operations.
  • When creating new entities (i.e. the model + service + resource trifecta) that are only stored in the DB and are not backed by OpenSearch indices, we usually subclass from RecordService and override/adapt/remove configuration and functionality that assumes any OpenSearch indexing to get things working. This is necessary because the base class has a lot of convenient functionality for schema validation, results rendering, serialization, and overall ease of configuration.

We have the following use cases so far of services that are DB-only and had to do this:


The proposal is to "lift" some of the functionality overridden/reimplemented in the above use cases into invenio-records-resources, to avoid duplication and benefit across the board from common utilities and features. Some of this common functionality includes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions