Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): allow hydration of non persistent embedded properties #5579

Merged
merged 5 commits into from
May 20, 2024

Conversation

toonvanstrijp
Copy link
Contributor

Closes #5578

Copy link
Member

@B4nan B4nan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test case so its clear what you are fixing and to confirm your changes actually resolves it

@toonvanstrijp
Copy link
Contributor Author

toonvanstrijp commented May 15, 2024

please add a test case so its clear what you are fixing and to confirm your changes actually resolves it

Added 🫡

Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.73%. Comparing base (9485daa) to head (a54adf3).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5579      +/-   ##
==========================================
- Coverage   99.74%   99.73%   -0.01%     
==========================================
  Files         260      260              
  Lines       17990    17997       +7     
  Branches     4374     4373       -1     
==========================================
+ Hits        17944    17950       +6     
- Misses         46       47       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -3,7 +3,7 @@
exports[`embedded entities with custom types schema: embeddables custom types 1 1`] = `
"create table "parent" ("id" serial primary key, "nested_some_value" varchar not null, "nested_deep_some_value" varchar not null, "nested2" jsonb not null, "after" int null, "some_value" varchar null);

create table "user" ("id" serial primary key, "savings_amount" numeric(14,2) not null, "after" int null);
create table "user" ("id" serial primary key, "savings_amount" numeric(14,2) not null, "views" double precision null, "after" int null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we agreed the persist: true would be overridden, and in such case there cant be any column. But on a second thought I guess it makes sense to leave it like this.

@B4nan B4nan changed the title fix: embeddable hydration of non persistent properties fix(core): allow hydration of non persistent embedded properties May 20, 2024
@B4nan B4nan merged commit e8c0c3f into mikro-orm:master May 20, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow hydration of virtual properties in embeddables
2 participants