Skip to content

Instantly share code, notes, and snippets.

View lqbz220's full-sized avatar

Lei Shi lqbz220

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lqbz220 on github.
  • I am leishi (https://keybase.io/leishi) on keybase.
  • I have a public key ASDxcuw_Ys0S80U2f-jp3I9Rtm-q99OfV80LlYhqCwqp6go

To claim this, I am signing this object:

Method Relationship Parameter Returns Side effects / notes
cat.addOwner() M:M owner {}, or ownerId created join table row
cat.addOwners() M:M array of owner {} or ownerId, can be a combination array of created join table rows
cat.countOwners() M:M none int
cat.createOwner() 1:1, 1:M, M:M new owner {} (what you could also pass into Owner.create() ) created owner object cat instance will have updated ownerId
cat.getOwner() 1:1, 1:M none owner object (if exists), or null
cat.getOwners() M:M none array of owner object(s)
cat.hasOwner() M:M owner {}, or ownerId boolean
cat.hasOwners() M:M array of owner {} or ownerId, can be a combination boolean returns true only if ALL owners own this cat
cat.removeOwner() M:M owner {}, or ownerId int number of owners removed