Tobias; I hope not anoying you with these questions. I did the setProperty, but only got success in simple valued reference properties. If a propertie is multivalued it doesn't work. Thats the code I did for mysetProperty:
Session session=referNode.getSession(); Node referenced = session.getNodeByUUID(id); Value referencedValue=session.getValueFactory().createValue(referenced); referNode.setProperty(xxx:categ, referencedValue); session.save(); Could you give an example of how it would be in case of 'xxx:categ' is multivalued? Thanks again Helio >> >> I've notice this is happen with the propertie of >> >> "requiredType=Reference". I can't assign a value to this propertie this >> >> way: Node.setPropertie(prop:Reference,"uuid")...The others are ok to set. >> > >> >because Reference properties can only be set using this siganture: >> >Node.setProperty(String, Node) >> Tobias, this is for set single valued reference, how to set this propertie >> when it is reference and multivalued? > >this signature does not exist. you need to generate a Value[] array, >using the session.getValueFactory().createValue(Node) signature, and >then pass this array to the setProperty(String, Value[]) method. > >regards, toby >-- >-------------------------------------------- >Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel >T +41 61 226 98 98, F +41 61 226 98 97 >-------------------------------------------------- >
