inibase 1.0.0-rc.55 → 1.0.0-rc.56

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Inibase
3
+ Copyright (c) 2024 Inibase
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.js CHANGED
@@ -536,7 +536,8 @@ export default class Inibase {
536
536
  }
537
537
  }
538
538
  else if (field.type === "table") {
539
- if ((await File.isExists(join(this.folder, this.database, field.key))) &&
539
+ if (field.table &&
540
+ (await File.isExists(join(this.folder, this.database, field.table))) &&
540
541
  (await File.isExists(join(tablePath, `${(prefix ?? "") + field.key}.inib`)))) {
541
542
  if (options.columns)
542
543
  options.columns = options.columns
@@ -548,7 +549,7 @@ export default class Inibase {
548
549
  if (!RETURN[index])
549
550
  RETURN[index] = {};
550
551
  RETURN[index][field.key] = item
551
- ? await this.get(field.key, item, options)
552
+ ? await this.get(field.table, item, options)
552
553
  : this.getDefaultValue(field);
553
554
  }));
554
555
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inibase",
3
- "version": "1.0.0-rc.55",
3
+ "version": "1.0.0-rc.56",
4
4
  "author": {
5
5
  "name": "Karim Amahtil",
6
6
  "email": "karim.amahtil@gmail.com"