Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dbRelationship Class Reference
[OOFILE Database package]

#include <oofrel.h>

Collaboration diagram for dbRelationship:

Collaboration graph
[legend]
List of all members.

Detailed Description

Object used to specify relationship between two dbTable instances.

Simple relationships just use dbRelationship as a functor. In cases like M:N relationships we need to create a named dbRelationship to call additional specification methods like linkMNvia();

Todo:
factor into mixin, but our OOF_mixRefCount has different semantics expecting at least one ref


Public Member Functions

 dbRelationship (dbRelRefBase &, dbRelRefBase &)
 dbRelationship (dbRelRefBase *, dbRelRefBase *)
 dbRelationship (dbRelRefBase &, dbRelRefBase &, dbField &, dbField &)
 dbRelationship (dbRelRefBase *, dbRelRefBase *, dbField *, dbField *)
void linkMNvia (dbRelRefBase &, dbRelRefBase &)
 Finish specifying an M:N relationship by pointing out from middle table to both sides.

void linkMNvia (dbRelRefBase *, dbRelRefBase *)


Constructor & Destructor Documentation

dbRelationship::dbRelationship dbRelRefBase ,
dbRelRefBase
 

dbRelationship::dbRelationship dbRelRefBase ,
dbRelRefBase
 

dbRelationship::dbRelationship dbRelRefBase ,
dbRelRefBase ,
dbField ,
dbField
 

dbRelationship::dbRelationship dbRelRefBase ,
dbRelRefBase ,
dbField ,
dbField
 


Member Function Documentation

void dbRelationship::linkMNvia dbRelRefBase ,
dbRelRefBase
 

void dbRelationship::linkMNvia dbRelRefBase lhsLink,
dbRelRefBase rhsLink
 

Finish specifying an M:N relationship by pointing out from middle table to both sides.

Assumes a pair of 1:N relationships have been created from the left and right tables to the middle table which maps the M:N. We can create an M:N link directly between the left and right tables usng a dbRelationship but need to not only specify the end-points but also the middle via linkMNvia().


The documentation for this class was generated from the following files:
Generated on Thu Jan 1 21:45:26 2004 for OOFILE by doxygen 1.3.5