All,
 
I took a look at Brian's example and it looks like something may be missing. The join function requires 3 params. FromObjectAlias, ToObjectAlias, and RelationshipAlias. When you leave out the last one reactor throws the following error:
 
The parameter RELATIONSHIPALIAS to function join is required but was not passed in.
 
The kicker however is this, when you pass in the alias it gives you this error:
 
Relationship Does Not Exist
The relationship alias TypeName does not exist on either ResourceDefinition or ResourceType.
 
Even thought the relationship and alias are defined in reactor.xml:
<object name="ResourceDefinition">
   <hasMany name="ResourceAttachment">
        <relate from="rid" to="rid" />
   </hasMany>
   <hasMany name="ResourceCategory">
        <relate from="rid" to="rid" />
   </hasMany>
   <hasOne name="ResourceType" alias="TypeName">
        <relate from="type" to="id" />
   </hasOne>
</object>
 
What gives?
 
Thanks,
 
Josh
 
 
 
 

------------------------------------------------
Joshua Scott
Resonant Media Technologies, LLC.
http://www.resonantmedia.com | http://ponderings.wordpress.com
 

"It is impossible to get out of a problem by using the same type of thinking that it took to get into the problem." -- Albert Einstein
 

 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shuck
Sent: Friday, May 26, 2006 2:16 PM
To: [email protected]
Subject: Re: [Reactor For CF] Reactor Joins

Brian Rinaldi has a nice example of a join in the 4th code div on this page:

http://www.remotesynthesis.com/blog/index.cfm/2006/2/17/Getting-Started-with-Reactor

~Dave

On 5/26/06, Pallavi Naresh <[EMAIL PROTECTED]> wrote:
I'm trying to understand how to perform joins with Reactor. 

I have two tables, "Employee" and "Position".  "Employee" has a positionId that corresponds to the employee's position.  The "Position" table translates the positionID to a name (such as "Manager"). 

I want to display a list of all employees and their position.  I can see how I could create an Employee gateway, and then iterate over each employee and query for its PositionName.  This is somewhat tedious and inefficient.   It would be more efficient to perform a SELECT that joins the two tables. 

Is there a way to accomplish this with Reactor?
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/



--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com
www.worldwildweb.biz -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to