{"issue":{"title":"Use another relation in where clause","created_at":"2011-04-20T13:22:26Z","user":{"login":"liferealized","id":29158,"url":"https://api.github.com/users/liferealized","gravatar_id":"f7af420ef254e236ad782144bca0a130","avatar_url":"https://secure.gravatar.com/avatar/f7af420ef254e236ad782144bca0a130?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"milestone":{"title":"0.2.0","created_at":"2011-08-01T18:04:40Z","creator":{"login":"dhumphreys","id":180375,"url":"https://api.github.com/users/dhumphreys","gravatar_id":"69336118c9d516e3f9b596b4a6eeb65d","avatar_url":"https://secure.gravatar.com/avatar/69336118c9d516e3f9b596b4a6eeb65d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"open_issues":11,"state":"open","due_on":null,"closed_issues":4,"number":2,"description":"Second release with more Rails 3 features including:\r\n\r\n* Association Proxies\r\n* Association Pre-loading / Eager Loading\r\n\r\nMore database support:\r\n\r\n* H2\r\n* Oracle\r\n\r\nAlso performance enhancements:\r\n\r\n* Sharing adapter/visitor objects between relations\r\n* Better caching of parses\r\n* Integration of parser and mapping into relation object","url":"https://api.github.com/repos/dhumphreys/cfrel/milestones/2"},"updated_at":"2011-12-23T20:27:18Z","state":"open","labels":[{"name":"core","url":"https://api.github.com/repos/dhumphreys/cfrel/labels/core","color":"0b02e1"},{"name":"enhancement","url":"https://api.github.com/repos/dhumphreys/cfrel/labels/enhancement","color":"02e10c"}],"id":793821,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"closed_at":null,"html_url":"https://github.com/dhumphreys/cfrel/issues/5","body":"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:\r\n\r\nloc.whereRelation = model(\"somemodel\").select(\"id\").where(\"year = ?\", [2009]);\r\n\r\nloc.relation = model(\"someOtherModel\").where(\"id NOT IN (?)\", [loc.whereRelation]);\r\n\r\nHope this makes sense.\r\n\r\nJames","number":5,"url":"https://api.github.com/repos/dhumphreys/cfrel/issues/5","comments":2,"assignee":null},"comment":{"created_at":"2011-12-23T20:27:18Z","user":{"login":"dhumphreys","id":180375,"url":"https://api.github.com/users/dhumphreys","gravatar_id":"69336118c9d516e3f9b596b4a6eeb65d","avatar_url":"https://secure.gravatar.com/avatar/69336118c9d516e3f9b596b4a6eeb65d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"updated_at":"2011-12-23T20:27:18Z","id":3264444,"body":"With 77bf9190c0, this should now be very easy to implement. Feature should be coming soon.","url":"https://api.github.com/repos/dhumphreys/cfrel/issues/comments/3264444"},"action":"created"}