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.
- package/README.md +7 -7
- package/dist/decorators/index.cjs +4 -1
- package/dist/decorators/index.cjs.map +1 -1
- package/dist/decorators/index.js +4 -1
- package/dist/decorators/index.js.map +1 -1
- package/dist/index.cjs +108 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +108 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/decorators/bootstrap.ts +4 -1
package/dist/decorators/index.js
CHANGED
|
@@ -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(
|
|
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
|
};
|