jQuery.Model.static.hasMany  function     

plugin: jquery/model/associations

Converts values on attribute name to instances of model type.

$.Model.extend("Task",{
  init : function(){
    this.hasMany("Person","people");
  }
},{})
$.Model.hasMany(type, name) -> undefined
{String}

The string name of the model.

{optional:String}

The name of the property.
Defaults to the shortName of the model with an "s" at the end.

{undefined}
© Jupiter IT - JavaScriptMVC Training and Support