Search
Preparing search index...
The search index is not available
Soukai API
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Soukai API
SingleModelRelation
Class SingleModelRelation<Parent, Related, RelatedClass>
Abstract
Type Parameters
Parent
extends
Model
=
Model
Related
extends
Model
=
Model
RelatedClass
extends
ModelConstructor
<
Related
>
=
ModelConstructor
<
Related
>
Hierarchy
Relation
<
Parent
,
Related
,
RelatedClass
>
SingleModelRelation
BelongsToOneRelation
HasOneRelation
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
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
Single
Model
Relation
<
Parent
,
Related
,
RelatedClass
>
(
parent
:
Parent
, relatedClass
:
RelatedClass
, foreignKeyName
?:
string
, localKeyName
?:
string
)
:
SingleModelRelation
<
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
SingleModelRelation
<
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
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
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
>
}
>
)
:
SingleModelRelation
<
Parent
,
Related
,
RelatedClass
>
Parameters
options:
Partial
<
{
clones
:
WeakMap
<
Model
,
Model
>
;
constructors
:
WeakMap
<
typeof
Model
,
typeof
Model
>
}
>
= {}
Returns
SingleModelRelation
<
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
(
related
:
Related
)
:
boolean
Parameters
related:
Related
Returns
boolean
Abstract
load
load
(
)
:
Promise
<
null
|
Related
>
Returns
Promise
<
null
|
Related
>
on
Delete
on
Delete
(
strategy
:
RelationDeleteStrategy
)
:
SingleModelRelation
<
Parent
,
Related
,
RelatedClass
>
Parameters
strategy:
RelationDeleteStrategy
Returns
SingleModelRelation
<
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
<
SingleModelRelation
<
Parent
,
Related
,
RelatedClass
>
>
Returns
RelationConstructor
<
SingleModelRelation
<
Parent
,
Related
,
RelatedClass
>
>
unload
unload
(
)
:
void
Returns
void
Exports
Single
Model
Relation
constructor
delete
Strategy
enabled
foreign
Key
Name
local
Key
Name
name
parent
related
related
Class
inverse
Relation
Classes
loaded
add
Related
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
.