xorm icon indicating copy to clipboard operation
xorm copied to clipboard

NodeJS ORM based on ObjectionJS with some extra utilities

Results 9 xorm issues
Sort by recently updated
recently updated
newest added

Something like: https://github.com/tgriesser/knex/issues/2462#issuecomment-364813102 can be added to Model class ``` async function withTransaction(knex, fn) { if (knex) return fn(knex); return transaction(Model.knex(), fn); } ```

enhancement
help wanted
good first issue
hacktoberfest

Something like: ```js Model.query().whereIf(condition, 'id', options.id); ```

enhancement

Objection.js Plugins: https://vincit.github.io/objection.js/guide/plugins.html https://vincit.github.io/objection.js/guide/plugins.html#plugin-development-best-practices We could break the Model class into multiple simpler plugins: - Cache/Redis-Cache - Data-Loader - Soft Delete - Timestamps - Query building helpers - GraphQL helpers...

enhancement
code

Ref: https://vincit.github.io/objection.js/api/model/instance-methods.html#todatabasejson This would fix cache also caching unnecessary values from getters and virtual properties

enhancement

When using objection's methods, the `this` returned is an instance of objection's QueryBuilder class instead of xorm's extended one. This is related to https://github.com/Vincit/objection.js/issues/319 This issue is only for tracking...

bug
types

Working example: ```js import knexUtils from '@smpx/knex-utils'; import {Model} from 'xorm'; const knex = knexUtils.getKnex(); Model.knex(knex); class Category extends Model { async $afterUpdate(opts, queryContext) { console.log('update'); // this is run...

bug

- `whereStrIn(column, value, {matchCase: false})`: search string in an array (with an option to match case) - `whereStrInJsonArray(column, value, {matchCase: false})`: search string in jsonb array (with an option to...

enhancement

Works when ```js query.whereInOrdered('name', args.names); ``` Does not work when ```js query.whereInOrdered('Brand.name', args.names); query.whereInOrdered('id', args.ids); query.whereInOrdered('Brand.id', args.ids); ```

bug

Hi I am thinking about your library because I want to switch from bookshelfjs to objectionsjs. Currently I am using transactions and DataLoader as well. Can you describe how are...