© 2026 Hedgehog Software, LLC
export const storesToStoreLocationsRelation = relations(Stores, ({ many }) => ({ storeLocations: many(StoreLocations), })); export const storesToLocationsRelation = relations(Stores, ({ many }) => ({ stackLocations: many(StackLocations), }));
export const storeLocationsToStoresRelation = relations(StoreLocations, ({ one }) => ({ stores: one(Stores, { fields: [StoreLocations.storeId], references: [Stores.id], }), }));
const result = await db2.query.Stores.findMany({ with: { storeLocations: { with: { stores: true, }, }, }, });
result[0].storeLocations
Property storeLocations does not exist...
console.info(result[0])
storeLocations