I guess what you mean is define a node type which says sameNameSiblings is false and specify that node type in my mapping.xml. But how would it check whether the two objects being stored under a node for that node type are same name siblings or not?Would it be based on some attribute of the object which i can specify through the mapping? Thanks.
Christophe Lombart wrote: > > On 9/21/07, Kaizer <[EMAIL PROTECTED]> wrote: >> >> >> In my case, its not with a collection but my top level object itself >> would >> dictate based on one of its attributes whether another object of the same >> type can be stored under the same node. > > For eg, I shouldnt be allowed to store 2 objects with the same "name" >> attribute under the same node. > > > Setting the sameNameSiblings = "false" in the childNodeDefinition is not a > solution ? > > > > > > > Christophe Lombart wrote: >> > >> > On 9/21/07, Kaizer <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> Hi, >> >> >> >> I'm using OCM and wanted to know how Same name siblings work in this >> >> case. >> > >> > >> > >> > It works with collection converters. If you are using specific node >> types, >> > you have to use the NTCollectionConverterImpl otherwise you have to use >> > the >> > DefaultCollectionImpl. Both converters have almost the same behavior in >> > term >> > of subnode name definition. By default, they use the same name for all >> > subnodes. This is a predefined value like "collection-element". If the >> > class-descriptor matching to the collection elements has an id (see the >> > fieldescriptor definition), the id value is used to build the subnode >> > name. >> > There are some examples in the uni tests. >> > >> > If you have still some problems, you can send us more information about >> > your >> > content model and we will try to make the mapping together. >> > >> > br, >> > Christophe >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Same-name-siblings-with-OCM-tf4494352.html#a12821977 >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Same-name-siblings-with-OCM-tf4494352.html#a12953571 Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
