Re: Double Model in frameworks and application

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Mar 14 2006 - 03:34:33 EST

  • Next message: John: "Re: Double Model in frameworks and application"

    BTW, I think I mostly figured the algorithm to merge multiple
    cayenne.xml files in a single runtime configuration based on domain
    and node naming. The idea is based on the fact that
    ClassLoader.getResources(..) can return multiple occurrences of the
    same resource URL, so Cayenne can read all instances of cayenne.xml
    from CLASSPATH and combine them together.

    But... I made a promise to myself to avoid adding any new features to
    1.2 release. That of course shouldn't stop others from implementing
    this logic as a Configuration subclass and sharing it on Wiki ;-)

    Andrus

    On Mar 14, 2006, at 11:13 AM, Andrus Adamchik wrote:

    > Don't put cayenne.xml in the shared libraries (jars, frameworks).
    > Only include the DataMap XML files in there. Then create one
    > cayenne.xml per application that lists needed DataMaps (including
    > those from shared libs). You can create such app-level cayenne.xml
    > manually (just use the one generated by the modeler as a template),
    > or you can assemble a shared Configuration instance straight in the
    > code (without cayenne.xml).
    >
    > Andrus
    >
    >
    > On Mar 14, 2006, at 3:08 AM, WONDER wrote:
    >> In Short,
    >> One Application can have only one Cayenne Model.
    >> Ok. What about framewokrs? not allowed to have thier Cayenne Model
    >> (s)?
    >>
    >> Sako.



    This archive was generated by hypermail 2.0.0 : Tue Mar 14 2006 - 03:34:43 EST