Pascal Voitot wrote:
  hello guys,
 I do the following:
 - I have a class with a DBStringList property "mylist"
 - In a velocity script, I do:
 #set($obj = $doc.getObject("MyClass", $mynb)
 #set($mylist = $obj.get("mylist"))
 #set($mylist = "${mylist}|${mynewlistitem}")
 #set($ret = $obj.set("mylist", $mylist))
 #set($ret = $doc.save())
 - I run this script and I can see in the DB that "mynewlistitem" was added
 as listitem to "mylist" but the item doesn't appear in the object editor
for
 property "mylist" in my document.
 - Moreover, I get some rendering exception in contentview.vm when I try to
 access this object in other velocity scripts.
 - When I create the link using the Object editor, then everything works well
 but I don't see anything different in the DB from the previous state.
 - I have tried the same with:
 #set($obj = $doc.getObject("MyClass", $mynb)
 #set($mylist = $obj.getProperty("mylist").getValue())
 #set($ret = $mylist.add("${mynewlistitem}"))
 #set($ret = $doc.save())
 same result...
 It seems the Object property is saved but it is not taken into account by
 the object in the document.
 Do you any clue for me?
  
- is the property multiselect? relational storage?
- would the mynewlistitem value be returned by the DB search? Or is it a
new value you want to include manually?
- does the DB query normally return one or two values?
- what exactly is the error you receive?
--
Sergiu Dumitriu
http://purl.org/net/sergiu/