[Prev] Thread [Next]  |  [Prev] Date [Next]

[cfwheels] Re: error using findByKey or findOne on a many to many relationship Vinyasa Tue Feb 21 21:00:05 2012

Ah. That worked. So the findAll returns a query by default, but the
findOne and findByKey return a structure by default and  Wheels kinda
chokes on the structure if there are three tables in a many-to-many
relationship. Is that it? Perhaps that is obvious to a more
experienced programmer, but a note in the documentation might be


On Feb 21, 6:18 pm, Yannick <[EMAIL PROTECTED]> wrote:
> Hi Todd,
> Do you get the same error when you try the following (returnAs=query)?:
> <cfset placement = model("placement").findByKey(key="#params.key#",
> include="tilead, page", returnAs="query")>
> On Tue, Feb 21, 2012 at 7:02 PM, Vinyasa <[EMAIL PROTECTED]> wrote:
> > Page.cfc: <cfset hasMany(name="placement")>
> --
> Yannick Morin
> Founder of bizonbytes.com

You received this message because you are subscribed to the Google Groups 
"ColdFusion on Wheels" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at