Answer the question
In order to leave comments, you need to log in
ContentProvider and One to many relationship
There are tables User, Post, Content. The user has a lot of posts and the post has a lot of content.
The Post and Content tables have a field that is a foreign key and refers to the User and Post tables, respectively.
Thus, when creating a post, I specify the id of the user who created it. And when creating content, I specify the id of the post to which it belongs.
And here I don't understand how to implement the method:
@Override
public Uri insert(Uri uri, ContentValues contentValues) {
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question