Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 20540 invoked from network); 11 Nov 2008 14:50:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2008 14:50:22 -0000 Received: (qmail 61218 invoked by uid 500); 11 Nov 2008 14:50:28 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 61202 invoked by uid 500); 11 Nov 2008 14:50:28 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 61191 invoked by uid 99); 11 Nov 2008 14:50:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 06:50:28 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christophe.lombart@gmail.com designates 74.125.44.28 as permitted sender) Received: from [74.125.44.28] (HELO yx-out-2324.google.com) (74.125.44.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 14:49:10 +0000 Received: by yx-out-2324.google.com with SMTP id 8so1175911yxm.1 for ; Tue, 11 Nov 2008 06:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=ACn1qeO0clrwpspUH6SQIyjnw7jlyQa4Eh2O4RfqpNI=; b=aU2Ilj1s2b87zgc8eKKeh4/O1yjOuJyCfoj5WijCsLU9ZmpW30a1Hgxmi7biPx3NLb Xs8vwmAqRU4e0HGkyqqm8AV4CgJmCQqp1+uogkF+RHsui3XSyZywqmPMUqDqZfm73Nw/ K/ELzI5zYpNkauGniLCDkQO4DRB7ibfh26slY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=q+JVCrudslu9GxgeJRNQYkIqJL9VDEt5MGo7+BDsz/fxeGElYYGVxDb6a1c51yYHzj 8YvPbOQu/oPUFN86b2YDX3bz1tWP9tpc2hRs1P1MXEj4pwyv9FJP1w4O0dLV7KSp/Ytn TcSo0eH4R1/QfLTXONRXIWu86HHC/hkpcdIQI= Received: by 10.142.199.10 with SMTP id w10mr3006736wff.235.1226414992472; Tue, 11 Nov 2008 06:49:52 -0800 (PST) Received: by 10.142.47.4 with HTTP; Tue, 11 Nov 2008 06:49:52 -0800 (PST) Message-ID: <3b728ee90811110649p7b8b935bwa5c37c6b6953903a@mail.gmail.com> Date: Tue, 11 Nov 2008 15:49:52 +0100 From: "Christophe Lombart" To: users@jackrabbit.apache.org Subject: Re: an alternative OCM (Object Content Mapping) In-Reply-To: <200811111327.58369.lukin@stu.cn.ua> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_99291_15213255.1226414992465" References: <20414717.post@talk.nabble.com> <4919573C.9030804@gmail.com> <200811111327.58369.lukin@stu.cn.ua> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_99291_15213255.1226414992465 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Nov 11, 2008 at 12:27, Aleksei Lukin 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 mylist; @Collection Map 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 > RIPE NIC HDL: LEXA1-RIPE > ------=_Part_99291_15213255.1226414992465--