Open liferealized opened 13 years ago
Relations cannot be passed into parameters, since those values are directly plugged into cfqueryparam tags. However, I see the need for sub-queries within WHERE and SELECT clauses. I plan on expanding the parser to accept full SQL SELECT statements. Maybe this is a good time to do that?
With 77bf9190c0, this should now be very easy to implement. Feature should be coming soon.
I was trying to a sub select in a where clause but it does't look like cfrel likes this. Something similar to the following:
loc.whereRelation = model("somemodel").select("id").where("year = ?", [2009]);
loc.relation = model("someOtherModel").where("id NOT IN (?)", [loc.whereRelation]);
Hope this makes sense.
James