Skip to Content
WebObjects® Developer's Guide
book

WebObjects® Developer's Guide

by Ravi Mendis
June 2002
Intermediate to advanced content levelIntermediate to advanced
400 pages
7h 48m
English
Sams
Content preview from WebObjects® Developer's Guide

Defining and Using Relationships

So far we have modeled Forum, Topic, and Post without any of the links that tie them together. Each Post has a Topic, a Topic has several Posts, and a Forum has a list of Topics.

These “links” are commonly known as relationships.

Introduction to To-One Relationships

When we say that a Post has a Topic we mean more formally that each Post object has, or is related to, one Topic object. The way that this is modeled at the object level is as attributes of type Enterprise Object.

On the other hand, the way the database keeps track of relations is by using a pointer. Post#1 is related to Topic#1, Post#2 is related to Topic#2, Post#3 is related to Topic#1, and so on.

So the POST table will have a column TOPIC_ID, which ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Real World XML

Real World XML

Steven Holzner
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0672323265Purchase book