Search
Preparing search index...
The search index is not available
Soukai API
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Soukai API
BelongsToOneRelation
Class BelongsToOneRelation<Parent, Related, RelatedClass>
Type Parameters
Parent
extends
Model
=
Model
Related
extends
Model
=
Model
RelatedClass
extends
ModelConstructor
<
Related
>
=
ModelConstructor
<
Related
>
Hierarchy
SingleModelRelation
<
Parent
,
Related
,
RelatedClass
>
BelongsToOneRelation
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
Belongs
To
One
Relation
<
Parent
,
Related
,
RelatedClass
>
(
parent
:
Parent
, relatedClass
:
RelatedClass
, foreignKeyName
?:
string
, localKeyName
?:
string
)
:
BelongsToOneRelation
<
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
BelongsToOneRelation
<
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
>
}
>
)
:
BelongsToOneRelation
<
Parent
,
Related
,
RelatedClass
>
Parameters
options:
Partial
<
{
clones
:
WeakMap
<
Model
,
Model
>
;
constructors
:
WeakMap
<
typeof
Model
,
typeof
Model
>
}
>
= {}
Returns
BelongsToOneRelation
<
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
load
load
(
)
:
Promise
<
null
|
Related
>
Returns
Promise
<
null
|
Related
>
on
Delete
on
Delete
(
strategy
:
RelationDeleteStrategy
)
:
BelongsToOneRelation
<
Parent
,
Related
,
RelatedClass
>
Parameters
strategy:
RelationDeleteStrategy
Returns
BelongsToOneRelation
<
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
<
BelongsToOneRelation
<
Parent
,
Related
,
RelatedClass
>
>
Returns
RelationConstructor
<
BelongsToOneRelation
<
Parent
,
Related
,
RelatedClass
>
>
unload
unload
(
)
:
void
Returns
void
Exports
Belongs
To
One
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
.