@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1515} ) : function ( o , v ) {
1616 o [ "default" ] = v ;
1717} ) ;
18- var __importStar = ( this && this . __importStar ) || function ( mod ) {
19- if ( mod && mod . __esModule ) return mod ;
20- var result = { } ;
21- if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
22- __setModuleDefault ( result , mod ) ;
23- return result ;
24- } ;
18+ var __importStar = ( this && this . __importStar ) || ( function ( ) {
19+ var ownKeys = function ( o ) {
20+ ownKeys = Object . getOwnPropertyNames || function ( o ) {
21+ var ar = [ ] ;
22+ for ( var k in o ) if ( Object . prototype . hasOwnProperty . call ( o , k ) ) ar [ ar . length ] = k ;
23+ return ar ;
24+ } ;
25+ return ownKeys ( o ) ;
26+ } ;
27+ return function ( mod ) {
28+ if ( mod && mod . __esModule ) return mod ;
29+ var result = { } ;
30+ if ( mod != null ) for ( var k = ownKeys ( mod ) , i = 0 ; i < k . length ; i ++ ) if ( k [ i ] !== "default" ) __createBinding ( result , mod , k [ i ] ) ;
31+ __setModuleDefault ( result , mod ) ;
32+ return result ;
33+ } ;
34+ } ) ( ) ;
2535var __importDefault = ( this && this . __importDefault ) || function ( mod ) {
2636 return ( mod && mod . __esModule ) ? mod : { "default" : mod } ;
2737} ;
@@ -35,7 +45,7 @@ const clone_1 = require("../utils/clone");
3545var ValidationErrorCode ;
3646( function ( ValidationErrorCode ) {
3747 ValidationErrorCode [ "IN_MEMORY_ENTITY_DATA_INVALID" ] = "IN_MEMORY_ENTITY_DATA_INVALID" ;
38- } ) ( ValidationErrorCode = exports . ValidationErrorCode || ( exports . ValidationErrorCode = { } ) ) ;
48+ } ) ( ValidationErrorCode || ( exports . ValidationErrorCode = ValidationErrorCode = { } ) ) ;
3949class EntityError extends Error {
4050 constructor ( { code, details } ) {
4151 super ( code ) ;
@@ -160,12 +170,6 @@ class InMemoryEntity {
160170 return false ;
161171 }
162172 }
163- get id ( ) {
164- return this . prop ( "_id" , "" ) ;
165- }
166- set id ( id ) {
167- this . setProp ( "_id" , id ) ;
168- }
169173 static get cls ( ) {
170174 return this . prototype . constructor . name ;
171175 }
@@ -176,12 +180,6 @@ class InMemoryEntity {
176180 getClsName ( ) {
177181 return this . constructor . name ;
178182 }
179- get slug ( ) {
180- return this . prop ( "slug" , "" ) ;
181- }
182- get isSystemEntity ( ) {
183- return Boolean ( this . prop ( "systemName" , "" ) ) ;
184- }
185183 /**
186184 * @summary get small identifying payload of object
187185 * @param byIdOnly if true, return only the id
@@ -220,6 +218,37 @@ class InMemoryEntity {
220218 }
221219 return filtered [ 0 ] ;
222220 }
221+ // Properties from BaseInMemoryEntitySchema
222+ get id ( ) {
223+ return this . prop ( "_id" , "" ) ;
224+ }
225+ set id ( id ) {
226+ this . setProp ( "_id" , id ) ;
227+ }
228+ get _id ( ) {
229+ return this . prop ( "_id" , "" ) ;
230+ }
231+ set _id ( id ) {
232+ this . setProp ( "_id" , id ) ;
233+ }
234+ get schemaVersion ( ) {
235+ return this . prop ( "schemaVersion" , "" ) ;
236+ }
237+ set schemaVersion ( schemaVersion ) {
238+ this . setProp ( "schemaVersion" , schemaVersion ) ;
239+ }
240+ get systemName ( ) {
241+ return this . prop ( "systemName" , "" ) ;
242+ }
243+ set systemName ( systemName ) {
244+ this . setProp ( "systemName" , systemName ) ;
245+ }
246+ get slug ( ) {
247+ return this . prop ( "slug" , "" ) ;
248+ }
249+ get isSystemEntity ( ) {
250+ return Boolean ( this . systemName ) ;
251+ }
223252}
224253exports . InMemoryEntity = InMemoryEntity ;
225254// Override if deepClone of config is required
0 commit comments