orchid-orm 1.6.14 → 1.6.15

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { columnTypes, getColumnTypes, addQueryOn, VirtualColumn, pushQueryValue, isQueryReturnsAll, getQueryAs, toSqlCacheKey, NotFoundError, relationQueryKey, Db, Adapter, anyShape, getClonedQueryData, columnsShapeToCode, codeToString, primaryKeyToCode, indexToCode, foreignKeyToCode, columnIndexesToCode, columnForeignKeysToCode, columnCheckToCode, columnDefaultArgumentToCode } from 'pqb';
1
+ import { columnTypes, getColumnTypes, addQueryOn, VirtualColumn, pushQueryValue, isQueryReturnsAll, getQueryAs, toSqlCacheKey, NotFoundError, relationQueryKey, Db, Adapter, anyShape, getClonedQueryData, columnsShapeToCode, primaryKeyToCode, indexToCode, foreignKeyToCode, columnIndexesToCode, columnForeignKeysToCode, columnCheckToCode } from 'pqb';
2
2
  export { columnTypes } from 'pqb';
3
- import { snakeCaseKey, emptyObject, pathToLog, singleQuote, quoteObjectKey, addCode } from 'orchid-core';
3
+ import { snakeCaseKey, emptyObject, pathToLog, singleQuote, codeToString, quoteObjectKey, addCode, columnDefaultArgumentToCode } from 'orchid-core';
4
4
  import * as path from 'path';
5
5
  import path__default from 'path';
6
6
  import fs from 'fs/promises';
@@ -423,7 +423,7 @@ const makeHasOneMethod = (table, relation, relationName, query) => {
423
423
  return (query2) => {
424
424
  const fromQuery = query2.clone();
425
425
  fromQuery.query.select = fromQuerySelect;
426
- relationQuery.query.fromQuery = fromQuery;
426
+ relationQuery.query.values = { from: fromQuery };
427
427
  };
428
428
  }
429
429
  };
@@ -619,7 +619,7 @@ const makeHasManyMethod = (table, relation, relationName, query) => {
619
619
  return (query2) => {
620
620
  const fromQuery = query2.clone();
621
621
  fromQuery.query.select = fromQuerySelect;
622
- relationQuery.query.fromQuery = fromQuery;
622
+ relationQuery.query.values = { from: fromQuery };
623
623
  };
624
624
  }
625
625
  };