Search
Preparing search index...
The search index is not available
Soukai API
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Soukai API
Relation
Class Relation<Parent, Related, RelatedClass>
Abstract
Type Parameters
Parent
extends
Model
=
Model
Related
extends
Model
=
Model
RelatedClass
extends
ModelConstructor
<
Related
>
=
ModelConstructor
<
Related
>
Hierarchy
Relation
MultiModelRelation
SingleModelRelation
Index
Constructors
constructor
Properties
delete
Strategy
enabled
foreign
Key
Name
local
Key
Name
name
parent
related
related
Class
inverse
Relation
Classes
Accessors
loaded
Methods
add
Related
clone
disable
enable
get
Loaded
Models
get
Models
initialize
Inverse
Relations
is
Empty
is
Inverse
Of
is
Related
load
on
Delete
resolve
set
Foreign
Attributes
static
unload
Constructors
constructor
new
Relation
<
Parent
,
Related
,
RelatedClass
>
(
parent
:
Parent
, relatedClass
:
RelatedClass
, foreignKeyName
:
string
, localKeyName
?:
string
)
:
Relation
<
Parent
,
Related
,
RelatedClass
>
Type Parameters
Parent
extends
Model
<
Parent
>
=
Model
Related
extends
Model
<
Related
>
=
Model
RelatedClass
extends
Constructor
<
Related
,
RelatedClass
>
&
typeof
Model
=
ModelConstructor
<
Related
>
Parameters
parent:
Parent
relatedClass:
RelatedClass
foreignKeyName:
string
Optional
localKeyName:
string
Returns
Relation
<
Parent
,
Related
,
RelatedClass
>
Properties
delete
Strategy
delete
Strategy
:
RelationDeleteStrategy
= null
enabled
enabled
:
boolean
= true
foreign
Key
Name
foreign
Key
Name
:
string
local
Key
Name
local
Key
Name
:
string
name
name
:
string
parent
parent
:
Parent
Optional
related
related
?:
null
|
Related
|
Related
[]
related
Class
related
Class
:
RelatedClass
Static
inverse
Relation
Classes
inverse
Relation
Classes
:
Constructor
<
Relation
<
Model
,
Model
,
ModelConstructor
<
Model
>
>
>
[]
= []
Accessors
loaded
get
loaded
(
)
:
boolean
Returns
boolean
Methods
Abstract
add
Related
add
Related
(
related
:
Related
)
:
void
Parameters
related:
Related
Returns
void
clone
clone
(
options
?:
Partial
<
{
clones
:
WeakMap
<
Model
,
Model
>
;
constructors
:
WeakMap
<
typeof
Model
,
typeof
Model
>
}
>
)
:
Relation
<
Parent
,
Related
,
RelatedClass
>
Parameters
options:
Partial
<
{
clones
:
WeakMap
<
Model
,
Model
>
;
constructors
:
WeakMap
<
typeof
Model
,
typeof
Model
>
}
>
= {}
Returns
Relation
<
Parent
,
Related
,
RelatedClass
>
disable
disable
(
)
:
void
Returns
void
enable
enable
(
)
:
void
Returns
void
get
Loaded
Models
get
Loaded
Models
(
)
:
Related
[]
Returns
Related
[]
get
Models
get
Models
(
)
:
Promise
<
Related
[]
>
Returns
Promise
<
Related
[]
>
initialize
Inverse
Relations
initialize
Inverse
Relations
(
model
:
Related
)
:
void
Parameters
model:
Related
Returns
void
is
Empty
is
Empty
(
)
:
null
|
boolean
Returns
null
|
boolean
is
Inverse
Of
is
Inverse
Of
(
relation
:
Relation
<
Model
,
Model
,
ModelConstructor
<
Model
>
>
)
:
boolean
Parameters
relation:
Relation
<
Model
,
Model
,
ModelConstructor
<
Model
>
>
Returns
boolean
Abstract
is
Related
is
Related
(
model
:
Related
)
:
boolean
Parameters
model:
Related
Returns
boolean
Abstract
load
load
(
)
:
Promise
<
null
|
Related
|
Related
[]
>
Returns
Promise
<
null
|
Related
|
Related
[]
>
on
Delete
on
Delete
(
strategy
:
RelationDeleteStrategy
)
:
Relation
<
Parent
,
Related
,
RelatedClass
>
Parameters
strategy:
RelationDeleteStrategy
Returns
Relation
<
Parent
,
Related
,
RelatedClass
>
resolve
resolve
(
)
:
Promise
<
null
|
Related
|
Related
[]
>
deprecated
This method has been renamed to
load
.
Returns
Promise
<
null
|
Related
|
Related
[]
>
Abstract
set
Foreign
Attributes
set
Foreign
Attributes
(
related
:
Related
)
:
void
Parameters
related:
Related
Returns
void
static
static
(
)
:
RelationConstructor
<
Relation
<
Parent
,
Related
,
RelatedClass
>
>
Returns
RelationConstructor
<
Relation
<
Parent
,
Related
,
RelatedClass
>
>
unload
unload
(
)
:
void
Returns
void
Exports
Relation
constructor
delete
Strategy
enabled
foreign
Key
Name
local
Key
Name
name
parent
related
related
Class
inverse
Relation
Classes
loaded
add
Related
clone
disable
enable
get
Loaded
Models
get
Models
initialize
Inverse
Relations
is
Empty
is
Inverse
Of
is
Related
load
on
Delete
resolve
set
Foreign
Attributes
static
unload
Generated using
TypeDoc
This method has been renamed to
load
.