<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Martin,<br>
<br>
I'm not sure I've tested it (I've used an API script to populate
compound fields (multilang fields in particular) where values were
stored using set_value() in the way you're mentioning), but if it
doesn't do so then it's API behaviour would be counter to the
other fields' behaviour.<br>
<br>
My script was something like that:<br>
<br>
use Data::Dumper;<br>
my $ep = EPrints->new();<br>
my $repo = $ep->repository( "myrepo" );<br>
my $ds = $repo->dataset("archive");<br>
my $list = $ds->search;<br>
my $n = $list->count();<br>
my @docs = $list->slice(0, $n);<br>
<br>
<br>
foreach $d (@docs)<br>
{<br>
if ($d->is_set('ml_title'))<br>
{<br>
print "item with id " . $d->id . " has ml_title set\n";<br>
} else {<br>
if ($d->is_set('title'))<br>
{<br>
# print "Updating ml_title for eprint.id = " .
$d->id . "\n";<br>
my $tit = $d->get_value('title');<br>
my @ml_tit = [ {lang=>'en', text=>$tit},
{lang=>'el', text=>$tit} ];<br>
# print Dumper(@ml_tit);<br>
$d->set_value('ml_title', @ml_tit);<br>
$d->commit();<br>
}<br>
}<br>
}<br>
<br>
I don't know, this may help you test your case...<br>
<br>
On 02/10/2015 05:37 μμ, <a class="moz-txt-link-abbreviated" href="mailto:martin.braendle@id.uzh.ch">martin.braendle@id.uzh.ch</a> wrote:<br>
</div>
<blockquote
cite="mid:EMEW3|7ba67227106df8d69a546ac88837d468r91FbQ14eprints-tech-bounces|ecs.soton.ac.uk|OFB83D5231.3D949328-ONC1257ED2.004F6826-C1257ED2.00504BE8@lotus.uzh.ch"
type="cite">
<p><font size="2" face="sans-serif">Hi,</font><br>
<br>
<font size="2" face="sans-serif">just a short question: Am I
assuming correctly if I update a compound multiple field with
</font><br>
<br>
<font size="2" face="sans-serif">$dataobj->set_value( array
of hashes ) </font><br>
<br>
<font size="2" face="sans-serif">that the new values overwrite
the existing ones and are not appended to the existing values?</font><br>
<br>
<font size="2" face="sans-serif">E.g. if I want to keep the
existing values, I need to read them out first and create a
merged array with the new values that I have to write back?</font><br>
<br>
<font size="2" face="sans-serif">Thanks,</font><br>
<br>
<font size="2" face="sans-serif">Martin</font><br>
<br>
<font size="2" face="sans-serif">--</font><br>
<font size="2" face="sans-serif">Dr. Martin Brändle</font><br>
<font size="2" face="sans-serif">Zentrale Informatik</font><br>
<font size="2" face="sans-serif">Universität Zürich</font><br>
<font size="2" face="sans-serif">Stampfenbachstr. 73</font><br>
<font size="2" face="sans-serif">CH-8006 Zürich</font><br>
<br>
</p>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
George Mamalakis
IT and Security Officer,
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)
School of Electrical and Computer Engineering
Aristotle University of Thessaloniki
phone number : +30 (2310) 994379
</pre>
</body>
</html>