Skip to content

Commit

Permalink
Add belongs to parameter to query
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultz committed Sep 7, 2011
1 parent 7ff59c5 commit 0e3cb1f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/mesh/model/store/Query.as
Expand Up @@ -27,6 +27,18 @@ package mesh.model.store

}

/**
* Sets the parent entity that the results of the query belong to.
*
* @param entity The entity that owns the results.
* @return This instance.
*/
public function belongingTo(entity:Entity):Query
{
_belongsTo = entity;
return this;
}

/**
* Returns the sort order for two entities based on the sort defined
* in this query.
Expand Down Expand Up @@ -108,6 +120,15 @@ package mesh.model.store
return this;
}

private var _belongsTo:Entity;
/**
* The parent entity that the results for this query belong to.
*/
public function get belongsTo():Entity
{
return _belongsTo;
}

private var _entityType:Class;
/**
* The type of <code>Entity</code> being queried on.
Expand Down

0 comments on commit 0e3cb1f

Please sign in to comment.