@spinajs/intl-orm
Advanced tools
Comparing version 2.0.176 to 2.0.177
@@ -29,3 +29,2 @@ import { Container } from '@spinajs/di'; | ||
export declare class IntlModelRelation extends OrmRelation { | ||
protected _container: Container; | ||
protected _lang: string; | ||
@@ -32,0 +31,0 @@ protected _mDescriptor: IModelDescriptor; |
@@ -55,3 +55,2 @@ "use strict"; | ||
}, _parentRelation); | ||
this._container = _container; | ||
this._lang = _lang; | ||
@@ -124,3 +123,2 @@ this._mDescriptor = _mDescriptor; | ||
this._relationQuery.middleware(hydrateMiddleware); | ||
// todo: fix this cast | ||
return await this._relationQuery; | ||
@@ -144,3 +142,3 @@ } | ||
const descriptor = (0, orm_1.extractModelDescriptor)(this._model); | ||
const relInstance = this._container.resolve(IntlModelRelation, [lang, this, descriptor, this._owner]); | ||
const relInstance = this._container.resolve(IntlModelRelation, [lang, this._container.get(orm_1.Orm), this, descriptor, this._owner]); | ||
relInstance.execute(); | ||
@@ -147,0 +145,0 @@ // translate all other relations automatically |
@@ -29,3 +29,2 @@ import { Container } from '@spinajs/di'; | ||
export declare class IntlModelRelation extends OrmRelation { | ||
protected _container: Container; | ||
protected _lang: string; | ||
@@ -32,0 +31,0 @@ protected _mDescriptor: IModelDescriptor; |
@@ -11,3 +11,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { Container, DI, Inject, Injectable, NewInstance } from '@spinajs/di'; | ||
import { SelectQueryBuilder as SQB, extractModelDescriptor, OrmRelation, RelationType, QueryMiddleware, BelongsToRelation } from '@spinajs/orm'; | ||
import { SelectQueryBuilder as SQB, extractModelDescriptor, Orm, OrmRelation, RelationType, QueryMiddleware, BelongsToRelation } from '@spinajs/orm'; | ||
import { TranslationSource, guessLanguage, defaultLanguage } from '@spinajs/intl'; | ||
@@ -36,3 +36,2 @@ import _ from 'lodash'; | ||
}, _parentRelation); | ||
this._container = _container; | ||
this._lang = _lang; | ||
@@ -105,3 +104,2 @@ this._mDescriptor = _mDescriptor; | ||
this._relationQuery.middleware(hydrateMiddleware); | ||
// todo: fix this cast | ||
return await this._relationQuery; | ||
@@ -124,3 +122,3 @@ } | ||
const descriptor = extractModelDescriptor(this._model); | ||
const relInstance = this._container.resolve(IntlModelRelation, [lang, this, descriptor, this._owner]); | ||
const relInstance = this._container.resolve(IntlModelRelation, [lang, this._container.get(Orm), this, descriptor, this._owner]); | ||
relInstance.execute(); | ||
@@ -127,0 +125,0 @@ // translate all other relations automatically |
{ | ||
"name": "@spinajs/intl-orm", | ||
"version": "2.0.176", | ||
"version": "2.0.177", | ||
"description": "Internationalization support for ORM module", | ||
@@ -53,9 +53,9 @@ | ||
"dependencies": { | ||
"@spinajs/configuration": "^2.0.176", | ||
"@spinajs/di": "^2.0.176", | ||
"@spinajs/exceptions": "^2.0.176", | ||
"@spinajs/intl": "^2.0.176", | ||
"@spinajs/log-common": "^2.0.176", | ||
"@spinajs/orm": "^2.0.176", | ||
"@spinajs/reflection": "^2.0.176", | ||
"@spinajs/configuration": "^2.0.177", | ||
"@spinajs/di": "^2.0.177", | ||
"@spinajs/exceptions": "^2.0.177", | ||
"@spinajs/intl": "^2.0.177", | ||
"@spinajs/log-common": "^2.0.177", | ||
"@spinajs/orm": "^2.0.177", | ||
"@spinajs/reflection": "^2.0.177", | ||
"luxon": "^3.2.1", | ||
@@ -65,5 +65,5 @@ "typescript-mix": "^3.1.3" | ||
"devDependencies": { | ||
"@spinajs/orm-sqlite": "^2.0.176" | ||
"@spinajs/orm-sqlite": "^2.0.177" | ||
}, | ||
"gitHead": "002dc553b0ffffd72193d0121ac425a4083bc9ee" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
208080
949
Updated@spinajs/di@^2.0.177
Updated@spinajs/exceptions@^2.0.177
Updated@spinajs/intl@^2.0.177
Updated@spinajs/log-common@^2.0.177
Updated@spinajs/orm@^2.0.177
Updated@spinajs/reflection@^2.0.177