I see - thanks Michael. According to the docs i should be able to do this a mix object that are strings or arrays of strings. Does this seem safe/reasonable?
String[] aka = new String[nd.akaNames.size()]; aka = nd.akaNames.toArray(aka); Map<String, Object> property = new HashMap<String, Object>(); property.put("name", nd.name); property.put("aka", aka); long nodeId = -1; nodeId = inserter.createNode(property, MyLabel.Person); On Thursday, June 16, 2016 at 12:54:23 PM UTC-7, Michael Hunger wrote: > > setNodeProperties overrides all properties > > so the map you use there has to contain all the properties you want to > have on your node > > On Thu, Jun 16, 2016 at 9:21 PM, John Fry <frydo...@gmail.com > <javascript:>> wrote: > >> >> here is what cypher returns >> >> START a=node(4238335) >> >> > return keys(a); >> >> +---------+ >> >> | keys(a) | >> >> +---------+ >> >> | ["aka"] | >> >> +---------+ >> >> 1 row >> >> 50 ms >> >> >> >> On Thursday, June 16, 2016 at 12:18:02 PM UTC-7, John Fry wrote: >>> >>> Hi All, >>> >>> when using the batch inserter java code below the property "name" >>> doesn't appear on the node when I check it via a Cypher query. >>> The property "aka" does however appear on the node. If i don't add the >>> "aka" property then the "name" property appears. >>> >>> I have been scratching me head on this for a while now - I can't seem to >>> create both "name" and "aka" properties. >>> >>> Thanks for any help, John, >>> >>> >>> >>> inserter.createDeferredSchemaIndex(MyLabel.Person).on("name").create(); >>> >>> ........... >>> >>> Map<String, Object> propertyName = new HashMap<String, Object>(); >>> >>> propertyName.put("name", nd.name); >>> >>> >>> long nodeId = -1; >>> >>> nodeId = inserter.createNode(propertyName, MyLabel.Person); >>> >>> >>> String[] aka = new String[nd.akaNames.size()]; >>> >>> aka = nd.akaNames.toArray(aka); >>> >>> Map<String, Object> propertyAka = new HashMap<String, Object>(); >>> >>> propertyAka.put("aka", aka); >>> >>> inserter.setNodeProperties(nodeId, propertyAka); >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.