@omnifyjp/ts 4.1.0 → 4.2.1

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.
@@ -1226,6 +1226,10 @@ function buildFindByIdMethod(modelName, eagerLoad, eagerCount, hasSoftDelete) {
1226
1226
  public function findById(string $id, bool $withTrashed = false): ${modelName}
1227
1227
  {
1228
1228
  ${queryAssignment}
1229
+
1230
+ // -- Eager loads via #81 hook (override applyFindByIdEagerLoads in sibling service) --
1231
+ $this->applyFindByIdEagerLoads($query);
1232
+
1229
1233
  if ($withTrashed) {
1230
1234
  $query->withTrashed();
1231
1235
  }
@@ -1621,6 +1625,10 @@ ${lookupExample}
1621
1625
  })
1622
1626
  ${orderByLine};
1623
1627
 
1628
+ // #81: override applyLookupEagerLoads in sibling service to add any
1629
+ // relations that the dropdown projection needs (keep it lean!).
1630
+ $this->applyLookupEagerLoads($query);
1631
+
1624
1632
  ${filterBlock}${softDeleteBlock}${limitBlock}
1625
1633
 
1626
1634
  // #76 followup (v3.21.2): use getAttributes() to bypass Astrotomic's
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnifyjp/ts",
3
- "version": "4.1.0",
3
+ "version": "4.2.1",
4
4
  "description": "TypeScript model type generator from Omnify schemas.json",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",