Workspaces: Correct way to create new WorkspaceDb in a Workspace Container? #7398
Replies: 1 comment 6 replies
-
Thanks for writing up a test which reproduces this. I was able to get your test to pass by adding a I'm not sure though if we should always call checkForChanges when resolving a WorkspaceDb file name, so I will spend some more time looking at this for a better solution. As a temporary workaround you could use |
Beta Was this translation helpful? Give feedback.
-
I'm trying to create a new WorkspaceDb in a Workspace Container, and then retrieve the latest version of that newly created WorkspaceDb by calling
IModelHost.appWorkspace.getWorkspaceDb()
.After creating the Workspace Container, the default WorkspaceDb gets created and then I create a new major version (1.0.0). I'm able to successfully get the v1.0.0 of the default WorkspaceDb thru
IModelHost.appWorkspace.getWorkspaceDb()
.In the same session, using the same WorkspaceEditor, I create a new WorkspaceDb in the same Workspace Container by calling
EditableWorkspaceContainer.createDb()
. The version of this new WorkspaceDb is 0.0.0, so I create a new major version 1.0.0 and publish the change. However, when I try to get the new WorkspaceDb by callingIModelHost.appWorkspace.getWorkspaceDb()
, it returns the WorkspaceDb v0.0.0, which I assumed would return v1.0.0.I have a created a test case to reproduce this scenario here: CloudWorkspace.test.ts.
Is my workflow incorrect for creating and retrieving the latest version of a new WorkspaceDb?
Beta Was this translation helpful? Give feedback.
All reactions