Hello,
I have the following setup
schema
schema.type('names') .ifNotExists() .property('property_id', UUID) .property('value', Text) .property('classification_ids', listOf(UUID)) .create() schema.type('hairColor') .ifNotExists() .property('property_id', UUID) .property('value', Text) .property('classification_ids', listOf(UUID)) .create() schema.type('height') .ifNotExists() .property('property_id', UUID) .property('value', Integer) .property('classification_ids', listOf(UUID)) .create() schema.vertexLabel('Person').ifNotExists() .partitionBy('person_id', UUID) .property('names', setOf(typeOf('names'))) .property('hairColor', setOf(typeOf('hairColor'))) .property('height', setOf(typeOf('height'))) .create() schema.vertexLabel('Person').searchIndex().ifNotExists().by('names').create() schema.vertexLabel('Person').searchIndex().ifNotExists().by('hairColor').create() schema.vertexLabel('Person').searchIndex().ifNotExists().by('height').create()
data
g.addV('Person') .property('person_id', UUID.randomUUID()) .property('names', [ [ property_id: UUID.randomUUID(), value:'Name1', classification_ids: [UUID.randomUUID()] as List] as names] as Set)
questions
How to add a second names instance to properties?
- it's not possible to use property(...) again, because this would overwrite the first added instance?
How to delete a specific names property instance, defined by "property_id"?
Thanks in advance
Josef