I am converting my spaghetti code application into OOP and have
separated everything out to beans, gateways, DAOs and services. I am
running into a wall trying to figure out how to establish
relationships between objects.

For example, I have the following tables in my database that have
one-to-many and many-to-many relationships:

PRODUCTS (table)
prodid (pk)
title
description
price

ARTICLES (table)
articleid (pk)
authorid (fk)
title
content

PROD_ART (linking table)
prodid (fk)
articleid (fk)

AUTHORS (table)
authorid (pk)
firstname
lastname
bio

How would I define these relationships? Each author has several
articles, each article is related to many products and each product is
related to many articles.

I have installed and created a blog using Model-Glue Unity to see how
Reactor defines these relationships but I cannot translate that over
to my application.

Do I create these relationships in the service layer, gateway, bean, etc?

Thanks for your help,
Aaron Roberson


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to