jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Harrison <peter.harri...@team.orcon.net.nz>
Subject Loading Properties in OCM
Date Mon, 08 Jul 2013 21:21:00 GMT
I can't see a separate list for OCM, so I am posting here.

When I have a collection of primitives in a POJO to store I wanted to be 
able to store in the form of Map<String,String>.

When storing an object which contains a collection it creates a node for 
the collection, and then a separate node for each element in the 
collection, with properties under each node representing the properties 
of the object.

However, when you have a 'primitive'  such as String (yes I know it is 
really an object) it would be good to store it as a property rather than 
a separate node. Rather than this:

+ object node
     + collection node
         + item1 node
             - value property
         + item2 node
             - value property
         + item3 node
             - value property

I would prefer:

+ object node
     + collection node
         - item1 property
         - item2 property
         - item3 property

Is there an existing way to achieve this? Having a look at the code for 
OCM it seems that it should be possible to write a Collection Converter 
Implementation to achieve this, but I thought i would raise it here to 
see if there is an existing way I am missing.


View raw message