@omnifyjp/ts 3.21.1 → 3.21.2

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.
@@ -1250,7 +1250,13 @@ ${lookupExample}
1250
1250
 
1251
1251
  ${filterBlock}${softDeleteBlock}${limitBlock}
1252
1252
 
1253
- return $query->get()->toArray();
1253
+ // #76 followup (v3.21.2): use getAttributes() to bypass Astrotomic's
1254
+ // Translatable::attributesToArray() override, which would overwrite
1255
+ // our COALESCE'd translatable columns with its own locale fallback
1256
+ // resolution (use_property_fallback-gated, default off). getAttributes()
1257
+ // returns the raw DB-column → value map as Eloquent populated it from
1258
+ // the SELECT, preserving our carefully crafted locale-aware values.
1259
+ return $query->get()->map(fn ($row) => $row->getAttributes())->toArray();
1254
1260
  }`;
1255
1261
  }
1256
1262
  // #76: translatable branch — leftJoin the sidecar keyed by
@@ -1320,7 +1326,13 @@ ${lookupExample}
1320
1326
 
1321
1327
  ${filterBlock}${softDeleteBlock}${limitBlock}
1322
1328
 
1323
- return $query->get()->toArray();
1329
+ // #76 followup (v3.21.2): use getAttributes() to bypass Astrotomic's
1330
+ // Translatable::attributesToArray() override, which would overwrite
1331
+ // our COALESCE'd translatable columns with its own locale fallback
1332
+ // resolution (use_property_fallback-gated, default off). getAttributes()
1333
+ // returns the raw DB-column → value map as Eloquent populated it from
1334
+ // the SELECT, preserving our carefully crafted locale-aware values.
1335
+ return $query->get()->map(fn ($row) => $row->getAttributes())->toArray();
1324
1336
  }`;
1325
1337
  }
1326
1338
  // ── flushTranslations() ────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnifyjp/ts",
3
- "version": "3.21.1",
3
+ "version": "3.21.2",
4
4
  "description": "TypeScript model type generator from Omnify schemas.json",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",