Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mikro-orm/mikro-orm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.4.1
Choose a base ref
...
head repository: mikro-orm/mikro-orm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.4.2
Choose a head ref
  • 15 commits
  • 62 files changed
  • 7 contributors

Commits on Dec 8, 2024

  1. Configuration menu
    Copy the full SHA
    635a3b7 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2024

  1. Configuration menu
    Copy the full SHA
    edbfaa2 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2024

  1. fix(entity-generator): support multi-line comments (#6290)

    Multi-line column comments are now supported when using MySQL, MariaDB,
    MSSQL, and PostgreSQL drivers.
    
    Closes #6286
    lsh4711 authored Dec 11, 2024
    Configuration menu
    Copy the full SHA
    4fdb169 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2024

  1. docs: Update 02-relationships.md (#6299)

    Respect the definite assignment assertion operator in the entity
    'Article'. Without assigning the previously missing class variables,
    TypeScript complains about the same.
    
    Closes mikro-orm/guide#5
    Ashvith10 authored Dec 14, 2024
    Configuration menu
    Copy the full SHA
    25a5bf1 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2024

  1. Configuration menu
    Copy the full SHA
    d46dc57 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2024

  1. fix(core): correctly handle populate of mapToPk relations (#6309)

    ### The Problem
    
    Related issue:
    [#6265](#6265). Before the
    changes, populating a `mapToPk` relation did not extract just the key;
    instead, the entire entity object was assigned to the property.
    
    ### The Solution
    
    I have added tests for both simple and composite primary keys. While
    adding tests for the `select-in` loading strategy, I noticed that the
    second query (for loading the primary key entity) is not executed. This
    makes sense because the keys are already selected.
    
    This led me to reconsider whether we should use a join for the `joined`
    strategy, as the keys are already present on the owning entity.
    
    **Select-in strategy:**
    
    ```sql
    select `t0`.* 
    from `team` as `t0` 
    where `t0`.`id` = 'team1' 
    limit 1
    ```
    **Joined strategy:**
    
    ```sql
    select `t0`.*, `c1`.`id` as `c1__id`
    from `team` as `t0`
    -- this join is redundant
    left join `order` as `c1` on `t0`.`current_order_id` = `c1`.`id`
    where `t0`.`id` = 'team1'
    limit 1
    ```
    
    EDIT: I have also added a test for the inverse side of a 1:1 relation
    using `mapToPk` to verify that it works as expected. Another redundant
    populate query was being made to the `Team` entity, which I addressed as
    well.
    
    ```sql
    select `o0`.*, `o1`.`id` as `o1__id`
    from `order` as `o0`
    left join `team` as `o1` on `o0`.`id` = `o1`.`current_order_id`
    where `o0`.`id` = 'order1'
    limit 1
    -- this populate query is redundant because we do not want the full entity
    select `t0`.*
    from `team` as `t0`
    where `t0`.`current_order_id` in ('order1')
    ```
    Ruby184 authored Dec 18, 2024
    Configuration menu
    Copy the full SHA
    61fb8f5 View commit details
    Browse the repository at this point in the history
  2. fix(query-builder): combine serialization hint from managed entities …

    …and QueryBuilder result (#6307)
    
    If you query entity already in identityMap, its serialization options
    will not be modified from joins from the query builder. This concats the
    populate options just like in `setSerializationOptions` so all fields
    will be populated from the identity map and inserted into the serialized
    result
    ladal1 authored Dec 18, 2024
    Configuration menu
    Copy the full SHA
    7d1a0dc View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2024

  1. fix(core): prevent reinsertion of an entity referenced by a formula w…

    …hen it is removed from a collection (#6265)
    
    ### The Problem
    
    When using a `toMany` relation on an entity and also adding a `formula`
    that references the same entity in the collection, removing the entity
    from the collection causes the `formula` relation to keep referencing
    it, resulting in the deleted entity being reinserted on flush.
    
    ### Description of the Solution
    
    I updated `referencingProperties` to allow multiple references on the
    same model, not just the first. However, the problem persisted because
    even though `unsetIdentity` performs `delete
    helper(referrer).__data[prop.name];`, it does nothing since `__data` is
    an empty object. I added an explicit override of the reference with
    `referrer[prop.name] = null;`.
    
    I’m not sure what the correct way to reset this reference is (another
    test is failing because of that), so advice would be appreciated.
    Options include:
    - Setting it to `null`  
    - Setting it to `undefined`  
    - Deleting the property with `delete referrer[prop.name]`
    
    ---------
    
    Co-authored-by: Martin Adámek <banan23@gmail.com>
    Ruby184 and B4nan authored Dec 19, 2024
    Configuration menu
    Copy the full SHA
    8f45243 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2024

  1. Configuration menu
    Copy the full SHA
    4e5b18b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9716a6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    de1ae67 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d175c9d View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2024

  1. chore: update mongodb

    B4nan committed Dec 22, 2024
    Configuration menu
    Copy the full SHA
    b1291fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58f9518 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    582826c View commit details
    Browse the repository at this point in the history
Loading