Mixin HasOne

    View code

    One-to-one association

    In the API reference below, replace with the actual name of your association, e.g. for User.hasOne(Project) the getter will be .This is almost the same as belongsTo with one exception. The foreign key will be defined on the target model.


    Get the associated instance.

    Params:


    Params:


    Create a new instance of the associated model and associate it with this.


    This document is automatically generated based on source code comments. Please do not edit it directly, as your changes will be ignored. Please write on IRC, open an issue or a create a pull request if you feel something can be improved. For help on how to write source code documentation see and dox