Skip to content

Multi-tenant custom field support #98

@ejsmith

Description

@ejsmith

Patternize multi-tenant custom field handling

  • Custom field mapping storage
    • Entity type (repo), tenant (should allow for composite like organization+type), field type, friendly name, extensible to store additional mapping information
    • Shared across multiple entity types and tenants
    • Auto assign index slots to new custom fields
    • Fill in gaps for index slots when fields have been deleted
    • Ability to efficiently lookup field mapping for an entity type and tenant
      • Aggressively cache mapping for the tenant
    • Ability to have a list of aliases for a field that will be used to resolve queries
      • Only the root name will be used for getting data that gets added to the idx slot
      • Aliases count as used names can't be used by other fields
  • Extensible field types
  • Easily implemented in repositories
    • Interface for model to implement that opts the repository into supporting custom fields
    • Automatically copies values from friendly names to idx slots
    • Automatically gets mapping and sets QueryFieldResolver on queries
  • Field management
    • Ability to change type of an existing field
      • Could start out as an auto field indexed as string and then be changed to a date or some other more specific type
    • Ability to remove a field
      • Cleanup idx values
      • Optionally remove custom field values
    • Ability to rename a field
  • Ability to auto create custom fields on the fly when we see a new value that does not have a mapping
    • Default to store as string with keyword subfield
    • Hook when auto creating custom property mappings that lets you decide if a mapping should be created and determine the default index type

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions