Thanks Doug, we're going to go the custom gateway method route. I just wanted to make sure I wasn't missing something, since using a join on the iterator gets me 95% of the way there (the join happens I just can't get columns from the joined table). Thanks.

On 8/31/06, Doug Hughes <[EMAIL PROTECTED]> wrote:

An iterator is an iterator for one specific object type.  It doesn't create another object type on the fly.  If you need a record as a result of your join try making either a view of the data and turning that into a record or using a method on a gateway.

 

HTH,

 

Doug

 


From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Brian Kotek
Sent: Thursday, August 31, 2006 10:24 PM
To: [email protected]
Subject: [Reactor for CF] Iterator Join Question

 

Here's a question that is stumping us. We're trying to join an iterator to another table. This seems to work, and in the debugging info I can see that the table contained in the iterator is being correctly joined to the target table. However, the problem is that only the columns from the first table are being selected. There doesn't seem to be any way to get Reactor to give me the columns from both tables. Anyone have any ideas?

<cfset local.joinedIterator = local.user.getClient().getClientPermissionIterator().join('ClientPermission', 'ProductModule', 'ProductModule', 'ProductModule').getQuery() />

Results in this query running:

SELECT                 
[ClientPermission].[clientID] AS [clientID],  [ClientPermission].[moduleID] AS [moduleID],  [ClientPermission].[productID] AS [productID],  [ClientPermission].[clientPermissionUUID] AS [clientPermissionUUID]

FROM
[GrantsNetwork].[Core].[ClientPermission] AS [ClientPermission] INNER JOIN [GrantsNetwork].[Core].[ProductModule] AS [ProductModule] ON [ClientPermission].[moduleID] = [ProductModule].[moduleID]
WHERE
[ClientPermission].[clientID] = ?


Query Parameter Value(s) -
Parameter #1(cf_sql_integer) = 2

As you can see, the join is happening, there just doesn't seem to be any way to get the columns from the ProductModule table. Any ideas appreciated. Thanks.

 


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to