Skip to content

hasOne relation doc #718

Closed
Closed

Description

@ezraroi

Hi,
there is not documentation for the hasOne relation, i am trying to use it but for some reason i am getting null when querying with the explorer

Activity

  1. self-assigned this
    on Nov 2, 2014
  2. crandmck commented on Nov 13, 2014

    @crandmck
    Contributor
  3. jbrw1984 commented on Feb 12, 2015

    @jbrw1984

    Any movement on this? Or should we just use the 'belongsTo' relationship?

  4. crandmck commented on Feb 12, 2015

    @crandmck
    Contributor

    Sorry I haven't gotten to this. Will try to carve out some time to improve it.

    I nneed to talk with Raymond... Here is something from him from chat re diff. btw 'hasOneandbelongsTo` (for my notes):

    belongsTo: An order belongs to a user (user owns the order)
    hasOne: a customer has one profile

  5. jbrw1984 commented on Feb 13, 2015

    @jbrw1984

    My question is - does this affect the $owner role? For example, right now I have multiple 'belongsTo' relations on a single model, even though a few should probably be better categorized as a 'hasOne' relation. In this case, how is the $owner role determined?

  6. crandmck commented on Feb 19, 2015

    @crandmck
    Contributor

    @raymondfeng Can you answer the above?

  7. crandmck commented on Feb 27, 2015

    @crandmck
    Contributor

    Updated http://docs.strongloop.com/display/LB/HasOne+relations as best as I could. I have a number of questions inline in the article. PTAL when you have a moment.

  8. raymondfeng commented on Feb 28, 2015

    @raymondfeng
    Member

    HasOne relation doesn't play a role in deciding $owner role.

  9. raymondfeng commented on Feb 28, 2015

    @raymondfeng
    Member

    Doc reviewed and updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions