@dnax/core 0.3.7 → 0.3.9

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.
@@ -177,7 +177,7 @@ class useRest {
177
177
 
178
178
  result.docs = await this.#tenant.database.db
179
179
  ?.collection(collection)
180
- .aggregate(pipeline, {
180
+ .aggregate(toBson(pipeline), {
181
181
  allowDiskUse: true,
182
182
  })
183
183
  .toArray();
package/lib/schema.ts CHANGED
@@ -124,7 +124,7 @@ function buildSchema(col: Collection) {
124
124
 
125
125
  if (!f?.validate?.schema) {
126
126
  if (f?.nullable) {
127
- propertySchema[f.name] = propertySchema[f.name].optional();
127
+ propertySchema[f.name] = propertySchema[f.name].optional().empty(null);
128
128
  }
129
129
 
130
130
  if (f?.required) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {