-
-
Notifications
You must be signed in to change notification settings - Fork 561
Comparing changes
Open a pull request
base repository: mikro-orm/mikro-orm
base: v6.4.1
head repository: mikro-orm/mikro-orm
compare: v6.4.2
- 15 commits
- 62 files changed
- 7 contributors
Commits on Dec 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 635a3b7 - Browse repository at this point
Copy the full SHA 635a3b7View commit details
Commits on Dec 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for edbfaa2 - Browse repository at this point
Copy the full SHA edbfaa2View commit details
Commits on Dec 11, 2024
-
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
Configuration menu - View commit details
-
Copy full SHA for 4fdb169 - Browse repository at this point
Copy the full SHA 4fdb169View commit details
Commits on Dec 14, 2024
-
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
Configuration menu - View commit details
-
Copy full SHA for 25a5bf1 - Browse repository at this point
Copy the full SHA 25a5bf1View commit details
Commits on Dec 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d46dc57 - Browse repository at this point
Copy the full SHA d46dc57View commit details
Commits on Dec 18, 2024
-
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') ```
Configuration menu - View commit details
-
Copy full SHA for 61fb8f5 - Browse repository at this point
Copy the full SHA 61fb8f5View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 7d1a0dc - Browse repository at this point
Copy the full SHA 7d1a0dcView commit details
Commits on Dec 19, 2024
-
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>
Configuration menu - View commit details
-
Copy full SHA for 8f45243 - Browse repository at this point
Copy the full SHA 8f45243View commit details
Commits on Dec 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4e5b18b - Browse repository at this point
Copy the full SHA 4e5b18bView commit details -
fix(reflection): fix source file detection after update to ts-morph v24
More info in dsherret/ts-morph#1593 Closes #6297
Configuration menu - View commit details
-
Copy full SHA for d9716a6 - Browse repository at this point
Copy the full SHA d9716a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for de1ae67 - Browse repository at this point
Copy the full SHA de1ae67View commit details -
Configuration menu - View commit details
-
Copy full SHA for d175c9d - Browse repository at this point
Copy the full SHA d175c9dView commit details
Commits on Dec 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b1291fb - Browse repository at this point
Copy the full SHA b1291fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58f9518 - Browse repository at this point
Copy the full SHA 58f9518View commit details -
Configuration menu - View commit details
-
Copy full SHA for 582826c - Browse repository at this point
Copy the full SHA 582826cView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v6.4.1...v6.4.2