1

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.

4
  • 1
    Something 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 way Commented 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 comment Commented 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 :) Commented Aug 6, 2020 at 5:41
  • Could you please explain why? Commented Aug 6, 2020 at 22:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.