-
Notifications
You must be signed in to change notification settings - Fork 191
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
example/lib/type_converter.dart
Outdated
@@ -24,3 +24,15 @@ class TaskTypeConverter extends TypeConverter<TaskType?, String?> { | |||
return value?.name; | |||
} | |||
} | |||
|
|||
class TaskStatusConverter extends TypeConverter<TaskStatus?, String?> { |
There was a problem hiding this comment.
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
example/lib/timestamp.dart
Outdated
int get hashCode => createdAt.hashCode ^ updatedAt.hashCode; | ||
|
||
@override | ||
String toString() { |
There was a problem hiding this comment.
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
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? |
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.