You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 8, 2019. It is now read-only.
The current behavior of associations is to rely on the data in a property on the model by the same name, so:
comment.hasOne('article');comment.article()// proxies using the value of the `article` property
This should remain the default behavior, but you should be able to optionally define a proxy as an alias for a different value, for example:
comment.hasOne('article',{alias_of: 'article_url'});comment.article()// proxies using the value of the `article_url` property
One important thing to consider: when an alias is set up in this way, it's important that we can still define article_url as an attribute but do not have to define it as an attribute.