Skip to content

Query: report the elementId Convert writes, so results join a converted graph #733

Description

@someshSandbox

A Query result can't be matched to the element Convert writes for it. Each reports a different identity, and the id Convert writes is not a queryable property.

// lib.sysml
package Lib { part def Engine { attribute mass : ScalarValues::Real; } }
// app.sysml
package App { private import Lib::*; part e : Engine; }

After ParseSources of both documents (develop 62f2442c3):

element Query (select: ["@id", "qualifiedName"]) Convert to api-json, @id
Lib Lib Lib
Lib::Engine Lib::Engine Lib__Engine
Lib::Engine::mass Lib::Engine::mass Lib__Engine__mass
App::e App::e App__e
ScalarValues::Real (scope: ["ScalarValues::Real"]) ScalarValues::Real 14c0aa22-5489-59b5-b438-ded26e83ba31 (normative id)

QueryResultElement.id is documented as the qualified name, "the identity this service reports", so this is by design. But select: ["elementId"] is refused (unknown query property "elementId"), and the qualified name maps to the written @id only through the writer's escaping. For a library element it doesn't map at all, since that id is a hash. A declared ElementId or -id uuid also changes the written id.

Request. Make elementId a queryable (selectable) property. It would report the id Convert writes for the element under the same id form: the declared id, the derived qualified-form id, or a library element's normative id. The two answers can then be joined without re-deriving ids on the client.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions