in this case you need a multivalue property. eg:
world.setProperty("message", new String[]{"Hello, World!", "Hello"});
On 2/10/08, vijay makija <[EMAIL PROTECTED]> wrote:
> Hi Jukka ,
>
> I want to add two properties to single node with same
> name. But when I try to do so, new property overrides
> older property.
> As in example below, on setting message 2nd time first
> value is overidden.
> Node hello = root.addNode("hello");
> Node world = hello.addNode("world");
> world.setProperty("message", "Hello, World!");
> world.setProperty("message", "Hello");
>
> Is there anyway I can add both properties?
>
> Thanks in advance,
> Regards,
> Vijay Makhija
>
> --- Jukka Zitting <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > Support for same name siblings is troublesome and
> > currently the best
> > practice is to avoid them if possible. In many cases
> > the default
> > response when we see people having problems with SNS
> > is to tell them
> > not to use the feature.
> >
> > I think that's lame. We should either treat SNS as a
> > first-class
> > feature that we just haven't been able to make work
> > yet, or explicitly
> > deprecate it and plan to drop or at least seriously
> > limit the feature
> > as far as is permitted by the JCR standard.
> >
> > The current status where SNS is kind of supported
> > but "you should not
> > use it!" is IMHO not sustainable in the long run.
> >
> > WDYT, is SNS worth the effort, or should we consider
> > dropping it?
> >
> > BR,
> >
> > Jukka Zitting
> >
>
>
>
>
> ____________________________________________________________________________________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
--
-----------------------------------------< [EMAIL PROTECTED] >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---