I had an argument with my co-worker about where we put class file that uses @Embedded @Relation annotations.
Do they count as Entities ? or should we create another package for them ? I have seen some github repo that they put them in Entity package and TBH usage of them look like entities to me .
We just don't want to mess the project architect duo to the complication and mass of the project also easy to read for other developers.
-
1Something tells me that it would be difficult for you to get credible answer. Since it would be opinion-based. Somebody could have opinion that any class with any Room annotation should be placed in some isolated DBO package (as well as classes with Retrofit-annotations - in isolated DTO package). Since if you decide to replace Room with another framework, it wouldn't be clean enough to change any class outside some DBO scope. Someone would tell that package doesn't matter at all. It seems that most of the architecture-questions are opinion-based and couldn't be answered in unambiguous waysergiy tykhonov– sergiy tykhonov2020-07-30 23:48:21 +00:00Commented Jul 30, 2020 at 23:48
-
Well at least I tried. I just need to be convinced and need an answer that makes sense. Thank you for your commentAlireza Sharifi– Alireza Sharifi2020-07-31 05:07:36 +00:00Commented Jul 31, 2020 at 5:07
-
Personally I would put them in a separate package to other @Entity annotated classes. I'm not sure who I'm siding with here :)Carson Holzheimer– Carson Holzheimer2020-08-06 05:41:09 +00:00Commented Aug 6, 2020 at 5:41
-
Could you please explain why?Alireza Sharifi– Alireza Sharifi2020-08-06 22:16:24 +00:00Commented Aug 6, 2020 at 22:16
Add a comment
|