Skip to content

Question: How should I handle a single master data entry? #112

@kochounoyume

Description

@kochounoyume

First of all, depending on the outcome of this discussion, this might turn into a feature request, but for now I’d like to simply ask this as a question.

I fully understand that MasterMemory is designed to provide a table structure for managing multiple data entries by ID. However, in practice, there are cases where master data consists of only a single record.

One possible approach would be to put that single record into a table and always query it by a fixed ID. That works, but it feels a bit awkward.

Since the auto-generated MemoryDatabase class is both sealed and non-partial, I cannot directly add a field for a single record. The best workaround I’ve come up with so far is to add an extension method to supplement this use case.

So my question is:

  • Is there a recommended way to handle such single-record master data?
  • Or is this kind of use case outside the intended scope of MasterMemory?

I’d love to hear your thoughts.

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