PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

sean.fennell_168661 avatar image
sean.fennell_168661 asked ·

Studio and .valueMap step can shadow property values

We have this issue in the classic graph and labs graph, but they manifest slightly differently

the label of the Element will override any properties name label on the element.


example:


given a vertex schema

schema.VertexLabel("Foo").primaryKey("ident", Text).property("label", Text)

and a vertex

g.addV("Foo").property("ident", "1@foo").property("label", "test").next()


using valueMap(true) //classic

or valueMap().with(WithOptions.tokens) // native

the label key in the resulting map is overridden from my property value, to the vertex label


g.V().has("Foo", "ident", "1@foo").valueMap().with(WithOptions.tokens).by(unfold()).next()

we get something like

{

"id": "Foo:1@foo#2",

"ident": "1@foo",

"label": "Foo"

}


If I omit the tokens I get the necessary data:

g.V().has("Foo", "ident", "1@foo").valueMap().by(unfold()).next()

{

"ident": "1@foo",

"label": "test"

}

Studio also does this when simply showing values. The label column is trumped by the Element label always.


Is there anything that can be done so that client properties do not get overridden by internal representations?

propertyshadowing
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bryn.cooke_101029 avatar image
bryn.cooke_101029 answered ·

Looks like you've discovered a bug. We've got an engineer looking at this now, and we'll get this in to the next labs release.

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks for sharing. How do you notify about new labs releases? Is there a thread I can follow or subscribe to?

1 Like 1 · ·

I'll feed this back to the team that does the release and as you say perhaps we can have a single thread to follow.

0 Likes 0 · ·
jlacefield avatar image
jlacefield answered ·

Thanks for the confirmation ... let me check with an engineer on this and get back to you shortly

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

sean.fennell_168661 avatar image
sean.fennell_168661 answered ·

No, it only impacts that field because they share the same name.

Is this a fundamental issue with tinkerpop or does it lie with datastax? We would have to treat this name as a restricted name and avoid it if it cannot be addressed.

We already have lots of data utilizing the "label" property name.

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

@sean.fennell_168661 If in the answers provided, you have found the right answer - please mark it by clicking on "Accept" - see below

0 Likes 0 · ·
jlacefield avatar image
jlacefield answered ·

Sean, if you change the property name from label to something else, does this still occur?

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Jonathan, Sorry for the late reply. I have not changed the label property name to something else because of time constraints. This would require a migration effort. Since we have to migrate to use new graph it may be a change worth making at that time.

0 Likes 0 · ·

On a related note. I'm noticing different behavior with Labs than I previously saw, maybe I just overlooked it. The Vertex Label is NOT overriding the property label in Labs. It's actually the other way around. I get my label property value but lose access to the type of vertex.

0 Likes 0 · ·