getEntityDefinition method

FutureOr<IMEntityDefinition> getEntityDefinition(
  1. MSchemaRef ref, {
  2. bool reload = false,
})

Implementation

FutureOr<IMEntityDefinition> getEntityDefinition(MSchemaRef ref,
    {bool reload = false}) {
  final schema = _internalGet(ref)!;
  return schema.thenOr((resolved) {
    if (schema is! IMEntityDefinition)
      throw "Schema $ref was not an entity schema";
    return schema;
  });
}