Hello.
I need some help. Assuming I have three tables/objects: forum, forum 
category, forum group.

Forum - stores all topics posted by user. This object/table relates to other 
tables including the aforementioned tables.
Forum category - stores the category whether science, technology, etc. 
forumcategoryid is the primary key
Forum group - stores the group e.g. Adult, Teens, etc forumgroupid is the 
primary key.

In my Forum data model:
//all necessary imports plus declarations

I'm storing forumcategoryid and forumgroupid in the table Forum so that I 
can link Forum Category & Forum Group. When user post a new topic, the user 
select the category and group from the dropdown box which are pulled from 
Forum category and Forum Group. Do I need to do something like this in the 
Forum entity class:

..
private ForumCategory forumCategory;
private ForumGroup forumGroup;


//getter and setters for these two; category & group

public Forum (list of all fields)
{
...

}

I'm all confused. When user post a topic, it needs to be in one of those 
existing category and group. User is not allowed to create new category or 
group. So embedding the forum category & group in Forum entity is pointless? 
Another solution that I can think of, since the value of forumcategoryid and 
forumgroupid are pulled from other table, i just might use these values and 
save it into data store as part of Forum properties (so in the forum entity 
I will have two additional   fields named private String forumCategoryID, 
private String forumGroupID).. Can someone help me or point me in right 
direction? I'm a total beginner on this.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/C4HAQaETdmQJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to