@reldens/storage 0.40.0 → 0.42.0

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.
@@ -50,8 +50,10 @@ class PrismaDataServer extends BaseDataServer
50
50
  this.entities = {};
51
51
  for(let i of Object.keys(this.rawEntities)){
52
52
  let rawEntity = this.rawEntities[i];
53
- if(!this.prisma[i]){
54
- Logger.critical('Invalid raw entity "'+i+'". No matching Prisma model found.');
53
+ let tableName = rawEntity.tableName.toString();
54
+ let prismaModel = this.prisma[tableName];
55
+ if(!prismaModel){
56
+ Logger.critical('Invalid raw entity "'+i+'". No matching Prisma model found for "'+tableName+'".');
55
57
  continue;
56
58
  }
57
59
  this.entities[i] = new PrismaDriver({
@@ -60,7 +62,7 @@ class PrismaDataServer extends BaseDataServer
60
62
  name: i,
61
63
  config: this.config,
62
64
  prisma: this.prisma,
63
- model: this.prisma[i],
65
+ model: prismaModel,
64
66
  server: this
65
67
  });
66
68
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reldens/storage",
3
3
  "scope": "@reldens",
4
- "version": "0.40.0",
4
+ "version": "0.42.0",
5
5
  "description": "Reldens - Storage",
6
6
  "author": "Damian A. Pastorini",
7
7
  "license": "MIT",