MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / entityNotManaged

Method entityNotManaged

packages/core/src/errors.ts:60–64  ·  view source on GitHub ↗
(entity: AnyEntity)

Source from the content-addressed store, hash-verified

58 }
59
60 static entityNotManaged(entity: AnyEntity): ValidationError {
61 return new ValidationError(
62 `Entity ${entity.constructor.name} is not managed. An entity is managed if its fetched from the database or registered as new through EntityManager.persist()`,
63 );
64 }
65
66 static notEntity(owner: AnyEntity, prop: EntityProperty, data: any): ValidationError {
67 const type = /\[object (\w+)]/.exec(Object.prototype.toString.call(data))![1].toLowerCase();

Callers 4

lockMethod · 0.80
getEntityManagerMethod · 0.80
initMethod · 0.80
populateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected