feathersjs-ecosystem / feathers-objection

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

_create() not fetching relations. Shouldn't it use insertGraphAndFetch() #155

Open bslayton opened 3 years ago

bslayton commented 3 years ago

_create(), which uses internal class method _getCreatedRecords() is not fetching relations. However, _update() and _patch() do fetch relations but is using upsertGraphAndFetch().

Does it make sense that _create() should use insertGraphAndFetch(), similarly to patch/update? Is there a reason I’m not seeing why _getCreatedRecords() is used instead of insertGraphAndFetch()?

dekelev commented 3 years ago

Hi @bslayton, I have no idea, but Maybe @mdmitry01 can answer this one.