metal-orm 1.0.30 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4906,12 +4906,15 @@ var bootstrapEntities = () => {
4906
4906
  var getTableDefFromEntity = (ctor) => {
4907
4907
  const meta = getEntityMetadata(ctor);
4908
4908
  if (!meta) return void 0;
4909
+ if (!meta.table) {
4910
+ bootstrapEntities();
4911
+ }
4909
4912
  return meta.table;
4910
4913
  };
4911
4914
  var selectFromEntity = (ctor) => {
4912
4915
  const table = getTableDefFromEntity(ctor);
4913
4916
  if (!table) {
4914
- throw new Error("Entity metadata has not been bootstrapped");
4917
+ throw new Error(`Entity '${ctor.name}' is not registered with decorators or has not been bootstrapped`);
4915
4918
  }
4916
4919
  return new SelectQueryBuilder(table);
4917
4920
  };