@mikro-orm/core 7.2.0-dev.17 → 7.2.0-dev.18
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/drivers/DatabaseDriver.js +4 -4
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
|
@@ -184,8 +184,8 @@ export class DatabaseDriver {
|
|
|
184
184
|
}
|
|
185
185
|
const createOrderBy = (prop, direction, properties = meta.properties, nullable = false) => {
|
|
186
186
|
const propMeta = properties[prop];
|
|
187
|
-
//
|
|
188
|
-
nullable ||= !!propMeta?.nullable;
|
|
187
|
+
// nullable relations and embeddables null out their joined columns, and a formula can yield null unannounced
|
|
188
|
+
nullable ||= !!propMeta?.nullable || !!propMeta?.formula;
|
|
189
189
|
if (Utils.isPlainObject(direction)) {
|
|
190
190
|
const childProps = propMeta?.kind === ReferenceKind.EMBEDDED ? propMeta.embeddedProps : propMeta?.targetMeta?.properties;
|
|
191
191
|
const value = Utils.getObjectQueryKeys(direction).reduce((o, key) => {
|
|
@@ -313,8 +313,8 @@ export class DatabaseDriver {
|
|
|
313
313
|
createCursorCondition(definition, offsets, inverse, meta, fromJson = false) {
|
|
314
314
|
const createCondition = (prop, direction, offset, eq = false, path = prop, properties = meta.properties, insideJson = false, nullable = false) => {
|
|
315
315
|
const propMeta = properties[prop];
|
|
316
|
-
//
|
|
317
|
-
nullable ||= !!propMeta?.nullable;
|
|
316
|
+
// nullable relations and embeddables null out their joined columns, and a formula can yield null unannounced
|
|
317
|
+
nullable ||= !!propMeta?.nullable || !!propMeta?.formula;
|
|
318
318
|
if (Utils.isPlainObject(direction)) {
|
|
319
319
|
if (offset === undefined) {
|
|
320
320
|
throw CursorError.missingValue(meta.className, path);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.2.0-dev.
|
|
3
|
+
"version": "7.2.0-dev.18",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
package/utils/Utils.js
CHANGED
|
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
|
|
|
153
153
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
154
154
|
export class Utils {
|
|
155
155
|
static PK_SEPARATOR = '~~~';
|
|
156
|
-
static #ORM_VERSION = '7.2.0-dev.
|
|
156
|
+
static #ORM_VERSION = '7.2.0-dev.18';
|
|
157
157
|
/** Default session variable name backing an RLS filter argument (`current_setting('mikro.<filter>.<arg>')`). */
|
|
158
158
|
static getRlsSettingName(filterName, argName) {
|
|
159
159
|
return `mikro.${filterName}.${argName}`;
|