Hello @spencer, one question from your reply here and opening new post as it can be useful for others.
I’m using Ceramic One and I’m able to successfully create models and instances.
For models with accountRelation
set to "single"
or "set"
, I understand that each user can create one instance (or one per unique set of fields, in the case of "set"
). When creating an instance with modelInstanceClient.createInstance
, I get a streamID
—even if the instance already exists. This is useful for me, because I could get the updated instance/document information easily having this streamID by using getDocumentState
method.
Is there a recommended way to retrieve the existing streamID
for a model instance without calling createInstance
again?
Because I know that calling createInstance
will return the streamID which is what I want, but I would expect different method than createInstance
, maybe something like getInstance
?
Or I must use flight-sql api to construct SQL query and retrieve the information? (using createInstance
I don’t need to use flight-sql query to get the streamID, so is faster and simpler at first sight from my point of view, but maybe I am wrong at some point).
Just want to make sure I’m not misunderstanding or misusing the API.
Thanks a lot!