schemock 0.0.4-alpha.3 → 0.0.4-alpha.4

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/dist/cli/index.js CHANGED
@@ -1758,7 +1758,7 @@ function generateEntityFactory(code, schema) {
1758
1758
  for (const field of schema.fields) {
1759
1759
  if (field.name === "id") {
1760
1760
  code.line("id: primaryKey(faker.string.uuid),");
1761
- } else if (field.isObject) {
1761
+ } else if (field.isArray || field.isObject) {
1762
1762
  if (field.nullable) {
1763
1763
  code.line(`${field.name}: nullable(() => JSON.stringify(${field.fakerCall})),`);
1764
1764
  } else {