Redesigning E/R instance definition

This commit is contained in:
Luca Frosini 2023-04-20 12:37:48 +02:00
parent 237d637809
commit 967e9c6ec6
3 changed files with 6 additions and 4 deletions

View File

@ -128,9 +128,7 @@ public class ContextManagement extends EntityElementManagement<Context, EntityTy
select.append(getName());
select.append("\"");
select.append(QueryLogicalOperator.AND.getLogicalOperator());
select.append("\'");
select.append(IdentifiableElement.UUID_PROPERTY);
select.append("\'");
select.append(QueryConditionalOperator.NE.getConditionalOperator());
select.append("\"");
select.append(parentContext.uuid);

View File

@ -1158,6 +1158,10 @@ public abstract class ElementManagement<El extends OElement, T extends Type> {
return metadataJson;
}
if(key.compareTo(IdentifiableElement.UUID_PROPERTY) == 0 ) {
return new TextNode(object.toString());
}
if(ignoreKeys.contains(key)) {
return null;
}

View File

@ -96,8 +96,8 @@ public class Utility {
}
// TODO Rewrite using Gremlin
String select = "SELECT FROM " + elementType + " WHERE '" + IdentifiableElement.UUID_PROPERTY
+ "' = \"" + uuid.toString() + "\"";
String select = "SELECT FROM " + elementType + " WHERE " + IdentifiableElement.UUID_PROPERTY
+ " = \"" + uuid.toString() + "\"";
OResultSet resultSet = oDatabaseDocument.query(select, new HashMap<>());