Feathers database adapter for Objection.js, an ORM based on KnexJS SQL query builder for Postgres, Redshift, MSSQL, MySQL, MariaDB, SQLite3, and Oracle. Forked from feathers-knex.
MIT License
98
stars
48
forks
source link
Handle missing top-level jsonSchema.properties in objectify() #149
If the jsonSchema of an Objection model does not contain a top-level properties field, objectify() will currently fail with errors like Cannot read property 'MyModel.id' of undefined. This happens for instance when the count query after a create operation is executed.
If the
jsonSchema
of an Objection model does not contain a top-levelproperties
field,objectify()
will currently fail with errors likeCannot read property 'MyModel.id' of undefined
. This happens for instance when the count query after a create operation is executed.Example schema:
The proposed sanity check allows to gracefully support JSON schemas that have use schema combination via
anyOf
,allOf
etc. at the top-level