Christophe Lombart wrote:
When we started the first OCM prototype in 2005, there were 2 solutions :
- Use a "path" attribute in each pojo .
or
- Use the path  as an argument in many ObjectContentManager methods like
ocm.insert(String path, Object object)

The first solution has been selected because the path is good candidate for
an object id.


I don't know if this has been discussed before, but I think this
requirement somehow ties the beans to jcr which is not nice :) I'm
wondering if there isn't a better way?


you are right. Maybe it is a bad influence from the ORM technologies :-) .
I mean,  having an  id like the path or an UUID is maybe not necessary in
our OCM framework. We can review if there is another alternative.

Hmm, yes - I can imagine that it might be difficult to get everything working without the path (id).

Currently I have the use case where I just want to store a bean at a specific path - the bean itself does not care about the path and I want to query these beans - but I don't need the path in the result.

Now, it's not a big deal to add the string property to my bean, but still it doesn't feel nice :) So the addition of insert(String path, Object object) and not requiring a path field when reading beans from jcr would be sufficient for my use case :)

Carsten
--
Carsten Ziegeler
[EMAIL PROTECTED]

Reply via email to