Conflict between "only" and "include" #27

Open
toots opened this Issue Dec 11, 2011 · 0 comments

Comments

Projects
None yet
1 participant
@toots

toots commented Dec 11, 2011

(Example in coffeescript)

Stream = FastLegS.Base.extend
  tableName  : "streams"
  primaryKey : "id"

Radio = FastLegS.Base.extend
  tableName  :"radios"
  primaryKey : "id"
  many       : [
    streams : Stream
    joinOn  : "radio_id"
  ]

Radio.find param, {
  order   : [ "name" ]
  only    : [ "id", "name", "title", "genre", "description"]
  include : { 
    streams : {
      only : [ "format", "url", "msg" ]
    }
  }
}, (err, radio) -> (...)

If I remove "id" from only then streams is empty..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment