Open Arzemn opened 3 years ago
As a user I want to have the ability to add a foreign key to an x-composite-index
Currently when adding a foreign key into the x-composite-index it generates a key error at the composite index creation step
Example:
ProjectDB: description: Basic Project Row type: object x-tablename: project properties: id: type: integer description: Unique identifier for the project example: 0 x-primary-key: true x-autoincrement: true project_id: type: integer description: Unique identifier for the project to the Server server_id: $ref: "#/components/schemas/ServerDB" x-composite-index: - project_id - server_id
Results in
KeyError: 'server_id'
Even attempting to use the underlying foreign key "server_id_id" fails
x-composite-index: - project_id - server_id_id
Result
open_alchemy.exceptions.MalformedSchemaError: ProjectDB :: x-composite-index :: all expressions must be properties, server_id_id is not
only way to overcome is to define the relation manually,
As a user I want to have the ability to add a foreign key to an x-composite-index
Currently when adding a foreign key into the x-composite-index it generates a key error at the composite index creation step
Example:
Results in
Even attempting to use the underlying foreign key "server_id_id" fails
Result
only way to overcome is to define the relation manually,