I am currently working with an object that is an instance of one of my models. My goal is to identify the store to which it belongs, directly from this instance. While exploring various options to achieve this, I came across the following console.log() output:
_data: Object
data: Object
dirty: true
editing: false
id: "ext-record-462"
internalId: "ext-record-462"
modified: Object
phantom: true
raw: Object
stores: Array[1]
__proto__: Object
length: 1
As displayed in the log, there is a variable called stores
, housing an array indicating the stores associated with this object:
stores: Array[1]
0: Class
length: 1
__proto__: Array[0]
I attempted to access this information using myObject.get('stores')
and myObject.stores
, only to be met with an output of undefined
. Is there any approach to retrieve this data, or does the framework restrict such actions?
Furthermore, upon successfully obtaining the relevant store, I aim to extract details about the connected object within a hasMany
relationship. Within the store's console.log(), I specifically noticed the following:
boundTo: Class
This specific field indicates the linked object under the association. Nevertheless, my attempts at fetching this data using myStore.get('boundTo')
and myStore.boundTo
ended in failure.
Thus, my query pertains to whether there exists a methodology to access these concealed properties.