orientdb: Error encoding edge label

OrientDB Version, operating system, or hardware.

  • v2.2.6

Operating System

  • Linux
  • MacOSX
  • Windows
  • Other Unix
  • Other, name?

Expected behavior and actual behavior

Transparently encode&decode edges’ labels

Steps to reproduce the problem

Insert an edge with a _label like /color/red. It will log a warning and then an exception like:

WARNING: $ANSI{green {db=db}} Requested command 'create edge type '%2Fcolor%2Fred' as subclass of 'E'' must be executed outside active transaction: the transaction will be committed and reopen right after it. To avoid this behavior execute it outside a transaction

javax.script.ScriptException: java.lang.IllegalArgumentException: Invalid field name 'out_%2Fcolor%2Fred'. Character '%' is invalid

NOTE:

  • Loading a dataset via gremlin API.
  • Potentially related to #5424

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 35 (17 by maintainers)

Most upvoted comments

Sorry for disappearing, but other critcal things required my attention.

I’ve now updated to the latest version: 2.2.13

But the inconsistency seams to remain. Here comes a small example with / in nodes’ attributes and edges’ labels.

The query SELECT * shows how the strings are stored escaped but also how they are returned escaped.

Using gremlin (bundeled in the installation) to query on the attributes or labels return no elements.

  • It is possible that the query arguments are escaped differently than how the data is physically stored?
  • It is semantically correct that I insert something in a database and when I query I get different values?

Thanks, Martin

** Data have been loaded with the combination of your suggestions:

echo "CREATE DATABASE PLOCAL:/srv/db ;ALTER DATABASE minimumclusters 1 ;QUIT" | "$ORIENTDB_HOME"/bin/console.sh
echo "CONNECT PLOCAL:/srv/db admin admin ;IMPORT DATABASE ${DATASET} -format=graphson ;QUIT" | time "$ORIENTDB_HOME"/bin/console.sh

@smolinari you’ve already done much! Thank you =)

That is above my knowledge. Sorry.

Scott