yarn @mikro-orm/core 6.3.0
v6.3.0

latest releases: 6.4.1-dev.2, 6.4.1-dev.1, 6.4.1-dev.0...
3 months ago

6.3.0 (2024-07-18)

https://mikro-orm.io/blog/mikro-orm-6-3-released

Bug Fixes

  • cli: enforce moduleResolution: 'nodenext' for CLI context (d5d7f38), closes #5514
  • core: allow em.transactional handler to be synchronous (#5696) (fd56714)
  • core: allow passing null to optional properties in em.create() (df0db99), closes #5827
  • core: ensure correct identity when upserting without primary key (cdbab12), closes #5702
  • core: ensure correct mapping of related columns to owning entity fields for complex relations (#5630) (302600e), closes #5629
  • core: ensure correct mapping to native bigint in sqlite and mysql (a16b801), closes #5737
  • core: fix auto flush mode for em.count() (62db127)
  • core: fix auto flush mode for em.findAndCount() (a572869)
  • core: fix batch update of nullable embedded arrays (c1ea284), closes #5723
  • core: fix detection of constructor parameters with default object value (58e8c2a), closes #5710
  • core: fix handling of pivot entities with M:N relations (fa89731), closes #5774
  • core: fix handling of raw query key of where condition with [] on right side (1e76509), closes #5825
  • core: fix populating entity graph with cycles (6505510)
  • core: fix processing of nullable embedded arrays (01612a1), closes #5715
  • core: ignore existing contexts in @CreateRequestContext() (1bb4e22), closes #5801
  • core: improve handling of JSON properties to support numeric strings in all drivers (#5780) (fc50c5f), closes #5773
  • core: make raw() accept readonly params (#5832) (7f9daf7)
  • core: respect populate option in Reference.load for loaded relations (04fb826), closes #5711
  • core: respect populateOrderBy with select-in strategy (3b83d29), closes #5693
  • core: respect nullability of wrapped types for ScalarReference's (#5722) (a1b8f07)
  • core: respect parent property prefix when child has prefix: false (94367b8), closes #5642
  • core: support for TS 5.5 (2fd7359)
  • core: support overloading embedded properties (#5784) (c57b528), closes #2987
  • core: use NonNullable instead of the internal Defined type (8ef28c4)
  • core: use the same transaction context in em.refresh() (dd17706), closes #5753
  • core: using EntityData<Entity, true> now works with IType (#5810) (f339ef5)
  • entity-generator: correctly serialize string prefixes in embedded references (#5826) (7882bca)
  • entity-generator: fix handling of primary keys that are foreign keys or enums (#5673) (b10413f)
  • entity-generator: fixed default values for enums (#5765) (58d914d)
  • entity-generator: generate all bidirectional relations in case of conflicts (#5779) (af845f1), closes #5738
  • entity-generator: include all entity options in EntitySchema definitions (#5674) (94ef44e)
  • entity-generator: output all DB related info even for virtual properties (#5817) (845b75c)
  • entity-generator: output entity and prop comments (#5699) (4ef21c4)
  • entity-generator: support complex enum names and values (#5670) (7dcb7be)
  • entity-generator: when using esmImport, FKs are now wrapped with Rel (#5771) (c28ab16)
  • mssql: add proper support for MSSQL's native "varchar" type (#5685) (0b514ce)
  • mssql: fix handling of non-UTC timezones (e78696c), closes #5695
  • mssql: only escape strings and unicode strings when necessary (#5786) (b4e0914), closes #5811
  • mysql: fix support for older MySQL versions than v8.0.13 when reading indexes (#5654) (3c4f665), closes #5653
  • postgres: implement diffing support for vector type (9eadac1), closes #5739
  • postgres: put new native enum values into the correct position (f79e3bc), closes #5791
  • postgresql: ignore tables that use inheritance during schema diffing (#5648) (55f452a)
  • postgres: respect empty string in enum items (c02f12e), closes #5751
  • postgres: support enum arrays with special characters (54b30cb), closes #5781
  • query-builder: don't use alias in more complex queries when not needed (#5679) (ad347e7), closes #5676
  • query-builder: interpolate raw query params early to ensure the correct binding position (9bd0fe9), closes #5706
  • query-builder: process raw query fragments under operator value (98510a3), closes #5724
  • query-builder: quote alias in formulas when joining virtual relations (68b64ec), closes #5705
  • query-builder: skip inner select for properties that map to a raw query fragment during pagination (1c5154a), closes #5709
  • schema: always prefer index/unique expression (96dff53), closes #5668
  • schema: do not drop FKs in down migrations when they are disabled (0dcfa80), closes #4993
  • schema: skip implicit FK index when defined explicitly by user on entity level (ff6bfdc), closes #5725
  • sql: fix ordering by m:1 and 1:1 relations with joined strategy (28119c6)
  • sql: ignore generated columns when computing changesets (55dfbf9), closes #5660
  • sqlite: fix altering tables via malformed temp table (#5683) (1b9087c), closes #5672
  • sql: rework detection of problematic batch updates and split more aggressively (b045033), closes #5656

Features

  • cli: always check TS files regardless of useTsNode (#5650) (7c34416)
  • core: addz Platform.getDefaultVarcharLength and optional Type.getDefaultLength (#5749) (29dcdeb)
  • core: allow passing raw() into onConflictFields of upsert methods (#5691) (bff90f2), closes #5668
  • core: allow upserting without a unique value (#5726) (75a4706)
  • core: check for ORM extensions dynamically (#5651) (68a3c1f)
  • core: implement "character" type (DB type "char") (#5684) (9fa5fad)
  • entity-generator: add a coreImportsPrefix option (#5669) (b9ab69a)
  • entity-generator: added option to output pure pivot tables (#5809) (832a626)
  • entity-generator: added the ability to add extra names to be imported (#5797) (82696b3)
  • entity-generator: allow custom types for scalar relations (#5435) (a8a9126)
  • entity-generator: enable the generator to dictate import specs via extraImport (#5772) (effd9fb)
  • entity-generator: repository class reference can be added from hooks (#5785) (44a49a9)
  • entity-generator: support adding groups through metadata hooks (#5793) (a756271)
  • libsql: support connecting to remote turso database (#5764) (6255a33)
  • migrations: allow initial migration to be blank if no entities are defined (#5802) (a8f6864)
  • migrations: make --blank also generate a down migration (#5657) (056d336)
  • postgres: allow specifying deferred mode on unique constraints (#5537) (7672b56)
  • postgres: support on delete set null/default with subset of columns (5353e6a), closes #5568
  • postresql: add support for varchar with unlimited length (#5707) (c22e971)
  • query-builder: infer Loaded hint based on joinAndSelect calls (#5482) (d18da6b)

Performance Improvements

  • core: improve serialization speed (136f704)
  • core: rework EntityKey type to improve tsserver performance (#5762) (dabe734), closes #5708

Don't miss a new core release

NewReleases is sending notifications on new releases.