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

Support embedded objects #829

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open

Conversation

hendrikvdkaaden
Copy link
Contributor

This pull request introduces support for embedded objects in the Floor library. Initially, I referred to pull request #565 but due to the extensive outdated changes, I decided to start fresh to avoid complex merge conflicts.

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.31%. Comparing base (9876f62) to head (d3d0079).

Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #829       +/-   ##
============================================
+ Coverage         0   94.31%   +94.31%     
============================================
  Files            0       10       +10     
  Lines            0      211      +211     
============================================
+ Hits             0      199      +199     
- Misses           0       12       +12     
Flag Coverage Δ
floor 94.31% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -24,3 +24,15 @@ class TaskTypeConverter extends TypeConverter<TaskType?, String?> {
return value?.name;
}
}

class TaskStatusConverter extends TypeConverter<TaskStatus?, String?> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is not needed, because TaskStatus is an enum

int get hashCode => createdAt.hashCode ^ updatedAt.hashCode;

@override
String toString() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really like using the toString function to for user-facing strings. I think it would be better to keep toString for technical things and introduce a new function, something like: format() to get a pretty user-facing String

@stephanmantel
Copy link
Contributor

This is already a good thing, but I noticed that it does not work if the embeded attribute is nullable. Can you add support for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants