Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

This field represents tree-structured set of entities related to this model. This is an extention of "hasMany" field.

Common Attributes

name

type

required

default value

description

name

string

yes

none

Name  of the field, must be unique in this model scope.

readonly

boolean

no

false

If true this field cannot be change by user.

required

boolean

no

false

If true this field will be required (validator and "not-null" database's contraint will be added). 

copyablebooleannotrue
(except hasMany, manyToMany and tree fields)
If true value of this field will be copied during entity copy.
Should be set to false for unique (see above) fields (except string and text).

persistent

boolean

no

true

If true this field will be stored in database.

Attributes

name

type

required

default value

description

model

string

yes

none

Name of corresponding model related to this field.

joinField

string

yes

none

name of field from corresponding model that will be used as join field. Type of this field must be "belongsTo".

plugin

string

no

none

Name of plugin where the corresponding model belongs.
If empty it is assumed that corresponding model belongs to the same plugin that field's model.

cascade

none/delete

no

none

Desribes behaviour when the entity is deleted: 'delete' means that all entities related through this field will be also deleted, 'none' means that no additional action will be invoked.

copyable

boolean

no

false

When this option is set tu 'true', all entities related to defined entity by this field will be copied when main entity is copied, so new entity creaded by copy operation will be related to copied entities instead of oryginal ones.

Example

<tree name="directories" model="directory" joinField="fileSystem" />
  • No labels