Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

133
Vistas
Neptune DB doesn't change property value to the previous value

I have very weird issue with AWS Neptune DB. I can only change property to new value and can't use any of previous names.
I'm using gremlin and node.js.
That sounds so weird so let me to add some code:

  const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection;
  const dc = new DriverRemoteConnection(process.env.DB_URL, { authenticator, connectOnStartup: false });
  await dc.open();
  const g = gremlin.process.AnonymousTraversalSource.traversal().withRemote(dc);

  await g.V().hasLabel('Wtf').drop().iterate();
  await g.addV('Wtf').property('test', 'foo').iterate()
  await g.V().hasLabel('Wtf').property('test', 'bar foo').iterate();
  await g.V().hasLabel('Wtf').property('test', 'foo').iterate();

  const wtf = await g.V().hasLabel('Wtf').elementMap().toList();
  console.log(wtf);

So I think I should have response like:

  Map(3) {
    EnumValue { typeName: 'T', elementName: 'id' } => '7cbdd4d6-9d72-905f-c4b1-0ee9a31db29a',
    EnumValue { typeName: 'T', elementName: 'label' } => 'Wtf',
    'test' => 'foo'
  }

but I have:

  Map(3) {
    EnumValue { typeName: 'T', elementName: 'id' } => '7cbdd4d6-9d72-905f-c4b1-0ee9a31db29a',
    EnumValue { typeName: 'T', elementName: 'label' } => 'Wtf',
    'test' => 'bar foo'
  }

Interesting thing, if I'm using any single word (without spaces) instead of bar foo I have proper result. And I have the same issue when I query database not one after another. Did someone saw such problem? Do you know how to solve it?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Neptune by default uses Set cardinality. Each time you add a value you are expanding that Set as you are not explicitly using Cardinality.single. Moreover, elementMap will only return one element of a Set cardinality property. To see them all use valueMap instead.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda