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.
A
Queryresult can't be matched to the elementConvertwrites for it. Each reports a different identity, and the idConvertwrites is not a queryable property.After
ParseSourcesof both documents (develop62f2442c3):Query(select: ["@id", "qualifiedName"])Converttoapi-json,@idLibLibLibLib::EngineLib::EngineLib__EngineLib::Engine::massLib::Engine::massLib__Engine__massApp::eApp::eApp__eScalarValues::Real(scope: ["ScalarValues::Real"])ScalarValues::Real14c0aa22-5489-59b5-b438-ded26e83ba31(normative id)QueryResultElement.idis documented as the qualified name, "the identity this service reports", so this is by design. Butselect: ["elementId"]is refused (unknown query property "elementId"), and the qualified name maps to the written@idonly through the writer's escaping. For a library element it doesn't map at all, since that id is a hash. A declaredElementIdor-id uuidalso changes the written id.Request. Make
elementIda queryable (selectable) property. It would report the idConvertwrites 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.