@Target(value=FIELD) @Retention(value=RUNTIME) @Inherited @Documented public @interface ModelAssociation
| Modifier and Type | Required Element and Description |
|---|---|
ModelAssociationType |
value
The type of the association.
|
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
autoLoad
True to automatically load the related store from a remote source when
instantiated.
|
String |
foreignKey
The name of the foreign key on the associated model that links it to the
owner model.
|
String |
getterName
The name of the getter function that will be added to the local model's
prototype.
|
Class<?> |
model
The class of the model that is being associated with.
|
String |
name
The name of the function to create on the owner model to retrieve the
child store.
|
String |
primaryKey
The name of the primary key on the associated model.
|
String |
setterName
The name of the setter function that will be added to the local model's
prototype.
|
public abstract ModelAssociationType value
Corresponds to the type config property.
public abstract Class<?> model
Corresponds to the model config property. The generated Javascript code contains either
the full qualified class name of the class or the string from
Model.value() if present on the class.
public abstract boolean autoLoad
Corresponds to the autoLoad config property.
Only ModelAssociationType.HAS_MANY association support this
property.
public abstract String foreignKey
Corresponds to the foreignKey config property.
public abstract String name
Corresponds to the name config property.
Only ModelAssociationType.HAS_MANY association support this
property.
public abstract String primaryKey
Model.idProperty().
Corresponds to the primaryKey config property.
public abstract String setterName
Corresponds to the setterName config property.
Only ModelAssociationType.BELONGS_TO and
ModelAssociationType.HAS_ONE associations support this property.
public abstract String getterName
Corresponds to the getterName config property.
Only ModelAssociationType.BELONGS_TO and
ModelAssociationType.HAS_ONE associations support this property.
Copyright © 2010-2013. All Rights Reserved.