Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E72DE200BF5 for ; Sat, 7 Jan 2017 23:13:32 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E255A160B3C; Sat, 7 Jan 2017 22:13:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 38E58160B27 for ; Sat, 7 Jan 2017 23:13:32 +0100 (CET) Received: (qmail 46803 invoked by uid 500); 7 Jan 2017 22:13:31 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 46791 invoked by uid 99); 7 Jan 2017 22:13:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2017 22:13:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8440A1849D1 for ; Sat, 7 Jan 2017 22:13:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.88 X-Spam-Level: * X-Spam-Status: No, score=1.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5teW69a1urdU for ; Sat, 7 Jan 2017 22:13:29 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C84225F477 for ; Sat, 7 Jan 2017 22:13:28 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id a197so62831773wmd.0 for ; Sat, 07 Jan 2017 14:13:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2tSzwpShV/jGkZSe+eWlzt/noM7NNEyv+WhkId1bks8=; b=h2hq/WVUCdb/dMXUQtf3/MDVVLKqLwauH5wx0PQ3216Z8OLPMNadcjMrZPI5mfOJ2N O3zS7BhfBUQbphBK2SH7FfjN8pPEOdsZFdzH1323/8syFXpeX156wUz8FXL/dj5c5UCy FD0Xw4fx5liffQhA678rwRWt4BDLbvCuY9rOwd5bskQ8k3tqMr0g4DceG+imMInV9e4c YPAykiKj26ThWENWu2ZXgpXWv6EaEFzxT6TarovBjnrGDr43dUAR3PSwP/VgGYU6qIZ6 YSoUIb0+I0jN5qMdJBgTIcRdfmw3P9GJ4JFgaNqSC/U/4hfClcrjaVCWYqZYeoZodmfG ZrrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=2tSzwpShV/jGkZSe+eWlzt/noM7NNEyv+WhkId1bks8=; b=PC34X5qylLRybmCf17Y0N2Z3V1ub5TjioVuZ4DynRmMI82GuTHfzZ4b6m/dH5Wys6t RVwtFxAj7tzBJCFhC2/94CruMQpL8f9yRIblEwOpPsdUyrPto2Je7CJTAxho3HxYLi0P jVU/5HpoD7q0gI5rTWJ1O+gwTl9GERzzrzlRW+KrMxsUYIgdopcZJHuuXG3vb7kKfXca jOUwdV7CSem9g2jWqwIzCoD/zSg9XkuYtzfpz1VIht/SmwQAGtle+yQmXc7r0DrQ/iZt eIvW4wHaa0hukSLbtlUHdzCs88AucB3Z0dLy02iCxK0X0KoY2xUD0E3d8t/byHRpehaS JR7w== X-Gm-Message-State: AIkVDXINmEgzqOTr7za6hk9sn/+/mtocbpYuoIaWGfX3Nsl7HnQgHgQCAhCE4TJvkCpOdv8hxPQj4IdxUMGQZg== X-Received: by 10.223.161.138 with SMTP id u10mr6221982wru.127.1483827207597; Sat, 07 Jan 2017 14:13:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.147.13 with HTTP; Sat, 7 Jan 2017 14:12:57 -0800 (PST) In-Reply-To: References: <67c9aa19b3cd4fa99e0a521428ae1bc1@git.apache.org> From: Michael Gentry Date: Sat, 7 Jan 2017 17:12:57 -0500 Message-ID: Subject: Re: Cayenne Modeler Extensions To: Cayenne Development Content-Type: multipart/alternative; boundary=f403045f41489e003e0545887108 archived-at: Sat, 07 Jan 2017 22:13:33 -0000 --f403045f41489e003e0545887108 Content-Type: text/plain; charset=UTF-8 Hi Andrus, I expect the XML format I'm proposing to change, so discussion is quite welcome. I'd forgotten I had included DB comments, but I can see the value of them. I suppose if you are doing a sync with the DB, if there are differences, query the user for which one to keep/use? Our use-cases never involve DB syncs, so this could be quite a blind spot for me. (We maintain Flyway migration scripts separately and update the Cayenne model by hand as needed.) We had looked at overriding getters/setters for annotations, but we didn't want to do that 1000s of times, so we gave up. I see value in the superclass being able to have annotations along with JavaDocs for various attributes and relationships, plus the class itself. The superclass is essentially maintained outside of the IDE currently, anyway (you may look at the code, but you don't edit it), so I don't think it'll be too bad. I'm also viewing this as a separate XML file. One that wouldn't need to be deployed, although it wouldn't hurt if present. Nothing in it is required for runtime support, unlike the main model. Everything is class-generation extensions only. Thanks, mrg On Sat, Jan 7, 2017 at 9:17 AM, Andrus Adamchik wrote: > > Re: https://github.com/apache/cayenne-modeler/blob/master/ > docs/XML-Extensions.md > > Something to discuss in more detail. I understand the value of all this > extra metadata, I am just concerned about its maintenance and integration > in Cayenne. > > * Some of it we won't be able to ignore outside the Modeler. Specifically > DB comments need to be reverse-engineered with Maven/Ant/Gradle. So it has > to be a part of the core model. > > * Also concerned about managing annotations in the Modeler. Placing them > in XML makes it clunky. Annotations are not a part of "ORM" paradigm (as > they have nothing to do with DB), but now the users will have to maintain > them outside of the IDE. My current approach is to override a given getter > or setter in subclass and place annotations there. Not ideal, but highly > practical. > > Andrus --f403045f41489e003e0545887108--