Skip to content
Mihael Safaric edited this page Jun 11, 2019 · 8 revisions

HasOne is used for decorating model properties which are related to another model. It takes one argument, HasOneOptions, the type and the default values can be checked here.

Options

  • includeInPayload: boolean

    • optional
    • if true, relationship link will be sent in POST/PUT requests
  • externalName: string

    • if your model property name and the property name fetched from the server are different, you can specify the external property name setting this property
    • this name will be used when parsing a response from server and also when generating a payload for sending it to the server

Clone this wiki locally