1. Are you ready for the Galaxy S20? Here is everything we know so far!

best practice for implementation of sub Type and Super Type in Room

Discussion in 'Android Development' started by eniac1989, Oct 20, 2018.

  1. eniac1989

    eniac1989 Lurker
    Thread Starter

    Hello my friends,
    I had a question about best practice for implementation of super type and sub type in android.
    I have different categories in my reminder application such as birthday,todo,shopping,... .So that they are in common in some properties which I thought that it would be better to be in parent type (category entity).I know that in Room we can use inheritance but it would gather parent fields in to sub types (same as attached file).
    I think it would make duplicate data in tables.So what is the best practice in this problem?

    Thanks in advance

    Attached Files:


    mrinal4mini likes this.

Share This Page