jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: an alternative OCM (Object Content Mapping)
Date Tue, 11 Nov 2008 14:49:52 GMT
On Tue, Nov 11, 2008 at 12:27, Aleksei Lukin <lukin@stu.cn.ua> wrote:

> On Tuesday 11 November 2008 12:29:46 Boni Gopalan (BioImagene) wrote:
> > OCM supports annotations and XML mappings.  And it supports custom
> > converters for simple types, Beans and collections.  The only
> disagreement
> > I have with the design is the need to carry 'path' as part of the bean
> that
> > I want to persist.
> [skip]
> >
> > Thanks
> > boni
> Well, my 2c  about things I do not like in current OCM.

You are welcome.

> 1. ocm_discriminator node type registration at startup and other messy
> stuff.  I could be hidden in some hard-coded static function lile ocmInit().

Agree. From 1.5, this node type is not used. So, it is not necessary to
register it on startup.

> 2. path as primary key. I discussed it a lot with author and we are both
> wih our own opinion :) I use path in base class just to satisfy ocm, but for
> real key I use uuid. It is
> fast and it allows to keep reference consistance.

You know my position :-) but it should be nice to see the point of view from
others. For me Path is still a better canditate for an object ID. Maybe we
can try to support both (Path or UUID) as the object id.

> 3. class registration in annotation mapper. I think global mpper cold
> handle this and @Node annoation may put registration code into. I'm
> constatntly forgetting to add class
> there :)

Same problem here :-) . I'm still looking for a good way to scan one or more
packages to find annoted classes on startup. Do you know how I can do it ?

> Thing I miss is Map. But I guess it is under development now.

Map & collection supports are better . Some thing like this :

@Node Class MyClass
       @Collection List<AnotherClass> mylist;
       @Collection Map<String, YetAnotherClass> myMap;

This is really simpler compare to the version 1.4. Don't blame me if the
@Collection is not a good name. There is a jira issue to review that. The
JPA annotations OneToMany or OneToOne are better for me.

> May be it's time to think on some improvemnent of smart mapping.

Please create jira issues at least to give us some ideas. I would like to
implement a "default" mapping (without annotation and xml description).

> Rest of annotation based stuff I like, I use, I'm happy with and thank you,
> Christophe! :)
> --
> SY, Alex Lukin

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message