Welcome Guest, Not a member yet? Register   Sign In
how to an extra AND condition in include_related() option in datamapper ?

i have a little problem here ..
i want to filter the results from the include_related table itself not in the table the parent model calls ...
where_related filtered the whole set of result ... that didn't work for me ...

hoping for somebody with a easy and nice way out of this problem.

Start by explaining exactly what you want, this doesn't make much sense to me.

An include_related is a JOIN, so any WHERE clause you insert in the query always has an effect on the end result.


I believe that I'm facing the same problem. The thing is i have to do this query:

FROM (`users`)
LEFT OUTER JOIN `pic_users` pic_users ON `users`.`id` = `pic_users`.`user_id` AND pic_users.status = TRUE

I need to add one more clause to my ON clause.

Anyone has ever faced something like that?


Theme © iAndrew 2016 - Forum software by © MyBB