Re: [bdbxml] 'Primary-Key'-like behaviour for an element attribute

George Feinberg <[email protected]>
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
> Hi all,
>
>    I'm defining indexes for my documents, and they look like this:
>
> <bo id='00001'>
>     <name> Breno </name>
> </bo>
>
>     Well, we have implemented a generator for new IDs, and I specified
> an "unique-node-attribute-equality-decimal" index for the bo node.

You say you did this for the "bo" node.  The index needs to be on
the "id" attribute.  If you really did use "bo" then you've added
an index for attributes named "bo" which you do not have.

You can use the dbxml shell program to experiment -- adding
indexes, documents, and using lookupIndex to verify that
you have entries where you expect them.

George

>
>     But I'm still able to add as many documents as I wish with the
> same id. I was expecting some exception to be thrown etc... am I
> missing something here?
>
> thanks in advance,
>
> -- Breno
>



------------------------------------------
To remove yourself from this list, send an
email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.