I have a java class representation of the said Pod object:
@Table(name = "Pod")
public class Pod extends Model
@Column(name = BaseModel.Columns.ItemId)
private String _id;
@Column(name = Columns.content)
private ArrayList<Content> content; //
@Column(name = Columns.updated)
private Date updated; //
//code here//
}
Here is the Content object:
@Table(name = "Content")
public class Content extends Model {
@Column(name = BaseModel.Columns.ItemId)
private String _id;
@Column(name = Columns.content)
private String content;
//code here//
}
Now the content array has Content items in it that can belong to many different Pods.
How would I build these relationships?
I've tried storing the content array as an array of string by parsing the array and storing a contentStrings array but I thought there must be a better way to reference the Content objects that are in my DB?
Im new to AA and I need some newb guidance!
I have a JSON
Pod
object:I have a java class representation of the said
Pod
object:Here is the
Content
object:Now the
content
array hasContent
items in it that can belong to many differentPod
s.How would I build these relationships?
I've tried storing the content array as an array of string by parsing the array and storing a contentStrings array but I thought there must be a better way to reference the
Content
objects that are in my DB?