Skip to content

Can EntitySchema be made equivalent to Decorator configuration? #11533

Open
@wszgrcy

Description

@wszgrcy

Feature Description

The current EntitySchema lacks Tree, VirtualColumn, and other related configurations.

Tree
VirtualColumn

The MetadataArgs of EntitySchema is missing the configuration for trees and the 'mode' property in columns as a virtual property.

Can relevant properties be added, or can the EntityMetadataBuilder class be made public for customizing metadata?

The Solution

method1

method2

  • public EntityMetadataBuilder api
  • custom define metadata build class
// Pseudo code
let metadata=new EntitySchemaTransformer().transform(entitySchemas)
let newClass=class{};
getMetadataArgsStorage().columns.push(...metadata.columns)
// ....
  • add custom build class to datasource

Considered Alternatives

no

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, but I don't know how to start. I would need guidance.

I can implement these features, but I'm not sure which option the author prefers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions