adonis hasone

JavaScript
const Model = use('Model')

class User extends Model {
  profile () {
    return this.hasOne('App/Models/Profile')
  }
}

module.exports = User
Source

Also in JavaScript: