jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: Same-name siblings problem
Date Mon, 05 Feb 2007 11:05:06 GMT
use a wildcard as name

[tx:ValuesType] > nt:base,mix:referenceable,mix:versionable,tx:Trackable
- tx:id (long)
- tx:qtext
+ * (tx:ValueType) = tx:ValueType multiple version

regards, toby
On 2/5/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> Ok, I have decided to go ahead and give the value nodes the name of the
> letter. But when I try adding them that way, I get a "Adding A-B Value node:
> javax.jcr.nodetype.ConstraintViolationException: no
> definition found in parent node's node type for new node: no matching child
> node definition found for {}A-B: no matching child node definition found for
> {}A-B" exception.
>
> I knew that I would get this error, as I don't define any node by the name
> A-B in my node type definition. But how do I do this?
>
> This is my current node definition of the Values node.
>
> [tx:ValuesType] >
> nt:base,mix:referenceable,mix:versionable,tx:Trackable
> - tx:id (long)
> - tx:qtext
> + tx:value (tx:ValueType)
> = tx:ValueType
> multiple version
>
> The name tx:value is what I am using. I can think of two possible solutions:
> 1) To make ValuesType as unstructured:
> In which case I would be able to add children as I wish. I am not too keen
> on doing this.
>
> 2) Define a child node without its name:
> I hope this is possible. If yes, how do I do it? I have no clue.
>
>
>  On 2/5/07, Tobias Bocanegra <tobias.bocanegra@day.com> wrote:
> > hi,
> >
> > > I am sorry ... I didn't understand your question regarding the test
> case.
> > write some code that reproduces the problem and create a jira issue.
> >
> > > I have 13 VALUE nodes which are like buckets. And into these buckets, I
> > > would be adding new VALUE nodes dynamically. eg. If the buckets were
> [A-D],
> > > [E-H], and so on. I would look at the new value, find out its first
> letter
> > > and create a VALUE node for it which would be added into the appropriate
> > > bucket.
> > so, why don't you give the value nodes the name of the letter?
> >
> > regards ,toby
> > --
> > -----------------------------------------<
> tobias.bocanegra@day.com >---
> > 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 >---
> >
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
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 >---

Mime
View raw message