Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DCE1F9F23 for ; Wed, 24 Oct 2012 11:58:42 +0000 (UTC) Received: (qmail 66440 invoked by uid 500); 24 Oct 2012 11:58:42 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 66322 invoked by uid 500); 24 Oct 2012 11:58:42 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 66302 invoked by uid 99); 24 Oct 2012 11:58:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2012 11:58:41 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [46.105.67.216] (HELO exchange.prot-on.net) (46.105.67.216) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2012 11:58:35 +0000 Received: from [10.10.5.188] (83.175.202.98) by exchange.prot-on.net (46.105.67.216) with Microsoft SMTP Server (TLS) id 14.1.218.12; Wed, 24 Oct 2012 13:58:12 +0200 Message-ID: <5087D7CE.8030408@prot-on.com> Date: Wed, 24 Oct 2012 13:58:06 +0200 From: Ramiro Aparicio User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Subject: Re: Splitting model References: <5087CEDD.3000201@prot-on.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [83.175.202.98] X-Virus-Checked: Checked by ClamAV on apache.org Umm I thougth a ServerRuntime could load only one configuration file, can you point me how can I load several? If thats possible even if the configuration must be done in a Java class (I would prefer XML but it is better that nothing) the only failing point is relationship between models of diferent modules, if they are 1-N it can be easily handled but N-1 or M-N are not that easy (first term is submodule model entity). Currently I am starting a new project very simple with low entity count so I will try this kind of setting as it makes a lot more sense to me. Ramiro El 24/10/2012 13:47, Andrus Adamchik escribi�: >> I am a big fan of making everything as modular as possible, > me too :) > >> and this configuration helps, but what I think it would be perfect is being able to put the diferent model files in diferent modules and just orchestrate DB nodes and model composition in the project file, like a maven project. >> I understand that there is nothing like that currently on 3.1 but I wanted to know if any of you had experience of something like that. > Actually I think you can do that in 3.1. There many possible scenarios. One would be a bunch of modules containing mapping-only projects, and then each "leaf" module in the dependency tree (e.g. a webapp project) would include them all when starting its ServerRuntime, and then configure a default DataNode (per CAY-1679 this is possible in 3.1 - dataDomain.setDefaultNode(..)). > > So I think a combination of DataNode-agnostic mapping projects and Java-based stack assembly (that is made easy in 3.1) should give us ultimate mapping modularity. If there are scenarios not well covered by this, let's discuss. > > Andrus > > > On Oct 24, 2012, at 2:19 PM, Ramiro Aparicio wrote: > >> Hi, >> >> After upgrading to 3.1 it is now more evident that you can split the data model and data nodes as it is needed so the model can span several DBs or several models can be in the same DB. >> I am a big fan of making everything as modular as possible, and this configuration helps, but what I think it would be perfect is being able to put the diferent model files in diferent modules and just orchestrate DB nodes and model composition in the project file, like a maven project. >> I understand that there is nothing like that currently on 3.1 but I wanted to know if any of you had experience of something like that. >> Indeed I am not sure if it can be done as probably path to other modules models will not be the same when developing or at runtime, but I think it will be a very interesting feature for big projects. >> >> Ramiro Aparicio >>