Search
Preparing search index...
The search index is not available
Soukai API
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Soukai API
HasManyRelation
Class HasManyRelation<Parent, Related, RelatedClass>
Type Parameters
Parent
extends
Model
=
Model
Related
extends
Model
=
Model
RelatedClass
extends
ModelConstructor
<
Related
>
=
ModelConstructor
<
Related
>
Hierarchy
MultiModelRelation
<
Parent
,
Related
,
RelatedClass
>
HasManyRelation
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
assert
Loaded
attach
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
Has
Many
Relation
<
Parent
,
Related
,
RelatedClass
>
(
parent
:
Parent
, relatedClass
:
RelatedClass
, foreignKeyName
?:
string
, localKeyName
?:
string
)
:
HasManyRelation
<
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
Optional
foreignKeyName:
string
Optional
localKeyName:
string
Returns
HasManyRelation
<
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
?:
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
add
Related
add
Related
(
related
:
Related
)
:
void
Parameters
related:
Related
Returns
void
Protected
assert
Loaded
assert
Loaded
(
method
:
string
)
:
this
is
{
related
:
Related
[]
}
Parameters
method:
string
Returns
this
is
{
related
:
Related
[]
}
attach
attach
(
model
?:
Related
)
:
Related
attach
(
attributes
:
Attributes
)
:
Related
Parameters
Optional
model:
Related
Returns
Related
Parameters
attributes:
Attributes
Returns
Related
clone
clone
(
options
?:
Partial
<
{
clones
:
WeakMap
<
Model
,
Model
>
;
constructors
:
WeakMap
<
typeof
Model
,
typeof
Model
>
}
>
)
:
HasManyRelation
<
Parent
,
Related
,
RelatedClass
>
Parameters
options:
Partial
<
{
clones
:
WeakMap
<
Model
,
Model
>
;
constructors
:
WeakMap
<
typeof
Model
,
typeof
Model
>
}
>
= {}
Returns
HasManyRelation
<
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
is
Related
is
Related
(
model
:
Related
)
:
boolean
Parameters
model:
Related
Returns
boolean
load
load
(
)
:
Promise
<
Related
[]
>
Returns
Promise
<
Related
[]
>
on
Delete
on
Delete
(
strategy
:
RelationDeleteStrategy
)
:
HasManyRelation
<
Parent
,
Related
,
RelatedClass
>
Parameters
strategy:
RelationDeleteStrategy
Returns
HasManyRelation
<
Parent
,
Related
,
RelatedClass
>
resolve
resolve
(
)
:
Promise
<
null
|
Related
|
Related
[]
>
deprecated
This method has been renamed to
load
.
Returns
Promise
<
null
|
Related
|
Related
[]
>
set
Foreign
Attributes
set
Foreign
Attributes
(
related
:
Related
)
:
void
Parameters
related:
Related
Returns
void
static
static
(
)
:
RelationConstructor
<
HasManyRelation
<
Parent
,
Related
,
RelatedClass
>
>
Returns
RelationConstructor
<
HasManyRelation
<
Parent
,
Related
,
RelatedClass
>
>
unload
unload
(
)
:
void
Returns
void
Exports
Has
Many
Relation
constructor
delete
Strategy
enabled
foreign
Key
Name
local
Key
Name
name
parent
related
related
Class
inverse
Relation
Classes
loaded
add
Related
assert
Loaded
attach
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
.