You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Hugi Thordarson <hu...@karlmenn.is> on 2011/11/03 11:45:31 UTC

Relationships between datamaps in different projects

Hi all!

Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?

Cheers,
- hugi


PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)

Re: Relationships between datamaps in different projects

Posted by Mike Kienenberger <mk...@gmail.com>.
Allow the ability to specify a resource loader in your cayenne.xml file.


On Thu, Nov 3, 2011 at 11:37 AM, Michael Gentry <mg...@masslight.net> wrote:
> Well, CM could see if the cayenne.xml file is in a src/main/resources
> directory and make an intelligent (?) assumption about finding the
> pom.xml.  If so, read the dependencies there and auto-add any
> cayenne.xml files it finds in the JARs listed.  Sounds trivial, right?
>  :-)
>
> mrg
>
>
> On Thu, Nov 3, 2011 at 11:30 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>
>> On Nov 3, 2011, at 6:23 PM, Hugi Thordarson wrote:
>>
>>> It would also be cool if a Cayenne project could reference a pom-file, using the dependencies declared there for finding DataMaps.
>>
>> yeah, this can be done if the Modeler is started from Maven: http://cayenne.apache.org/doc30/maven2-modeler.html
>>
>> In general we are hostages of our IDE and build system-agnostic approach. If we support Maven, than what about Ant, or what about users who don't use a well-known build system and rely on IDE-proprietary project files.
>>
>> Andrus
>

Re: Relationships between datamaps in different projects

Posted by Robert Zeigler <ro...@roxanemy.com>.
Unless the user is using gradle, in which case cayenne.xml might well be found in src/main/resources, but there won't be a pom.xml file. ;)

Robert

On Nov 3, 2011, at 11/310:37 AM , Michael Gentry wrote:

> Well, CM could see if the cayenne.xml file is in a src/main/resources
> directory and make an intelligent (?) assumption about finding the
> pom.xml.  If so, read the dependencies there and auto-add any
> cayenne.xml files it finds in the JARs listed.  Sounds trivial, right?
> :-)
> 
> mrg
> 
> 
> On Thu, Nov 3, 2011 at 11:30 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>> 
>> On Nov 3, 2011, at 6:23 PM, Hugi Thordarson wrote:
>> 
>>> It would also be cool if a Cayenne project could reference a pom-file, using the dependencies declared there for finding DataMaps.
>> 
>> yeah, this can be done if the Modeler is started from Maven: http://cayenne.apache.org/doc30/maven2-modeler.html
>> 
>> In general we are hostages of our IDE and build system-agnostic approach. If we support Maven, than what about Ant, or what about users who don't use a well-known build system and rely on IDE-proprietary project files.
>> 
>> Andrus


Re: Relationships between datamaps in different projects

Posted by Michael Gentry <mg...@masslight.net>.
Well, CM could see if the cayenne.xml file is in a src/main/resources
directory and make an intelligent (?) assumption about finding the
pom.xml.  If so, read the dependencies there and auto-add any
cayenne.xml files it finds in the JARs listed.  Sounds trivial, right?
 :-)

mrg


On Thu, Nov 3, 2011 at 11:30 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>
> On Nov 3, 2011, at 6:23 PM, Hugi Thordarson wrote:
>
>> It would also be cool if a Cayenne project could reference a pom-file, using the dependencies declared there for finding DataMaps.
>
> yeah, this can be done if the Modeler is started from Maven: http://cayenne.apache.org/doc30/maven2-modeler.html
>
> In general we are hostages of our IDE and build system-agnostic approach. If we support Maven, than what about Ant, or what about users who don't use a well-known build system and rely on IDE-proprietary project files.
>
> Andrus

Re: Relationships between datamaps in different projects

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Nov 3, 2011, at 6:23 PM, Hugi Thordarson wrote:

> It would also be cool if a Cayenne project could reference a pom-file, using the dependencies declared there for finding DataMaps.

yeah, this can be done if the Modeler is started from Maven: http://cayenne.apache.org/doc30/maven2-modeler.html 

In general we are hostages of our IDE and build system-agnostic approach. If we support Maven, than what about Ant, or what about users who don't use a well-known build system and rely on IDE-proprietary project files.

Andrus

Re: Relationships between datamaps in different projects

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Nov 3, 2011, at 6:23 PM, Hugi Thordarson wrote:

> A first step towards providing some cross-project functionality in Modeler might be to just pick up cayenne.xml files in jar-files on the Modeler classpath? 

Unfortunately Modeler's own classpath is unhelpful here. If the Modeler is started from a Maven plugin or from Eclipse (we have these options), we can squeeze extra entries in there, but otherwise it knows nothing about the projects.

Andrus


Re: Relationships between datamaps in different projects

Posted by Hugi Thordarson <hu...@karlmenn.is>.
Not exactly—rather all EOModels in frameworks referenced by your project are picked up by Entity Modeler (no matter where the frameworks reside). But it's indeed true that the world of Frameworks and NSBundle is indeed a lot simpler than the world of Plain Old Classpath :).
Entity Modeler also has the luxury of running within Eclipse and thus has access to the project's list of referenced frameworks.

A first step towards providing some cross-project functionality in Modeler might be to just pick up cayenne.xml files in jar-files on the Modeler classpath? (like Cayenne does at runtime) Or even just add a preference item where you can specify a static list of globally referenced maps? (that's kind of ugly, though).

It would also be cool if a Cayenne project could reference a pom-file, using the dependencies declared there for finding DataMaps.

Cheers,
- hugi



On 3.11.2011, at 15:13, Andrus Adamchik wrote:

> In the Apple world everything you have is installed in /Library/Frameworks, so it is always easy to find :-)
> 
> On Nov 3, 2011, at 5:28 PM, Michael Gentry wrote:
> 
>> A quick Google gives this API-wise:
>> 
>> http://www.spice-of-life.net/wodock/api/com/webobjects/eoaccess/EOModelGroup.html
>> 
>> and this UI-wise:
>> 
>> http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/index.html?http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/Forming_Rel_ata_Sources.html
>> 
>> mrg
>> 
>> 
>> On Thu, Nov 3, 2011 at 9:46 AM, Michael Gentry <mg...@masslight.net> wrote:
>>> You'd add to CM a place to look for other other models (either a
>>> classpath approach or explicitly identify the other models).  CM
>>> wouldn't need to edit the other models, but in the relationship
>>> inspector allow referencing the other entities in the model group.  At
>>> least that's a first approach.  I didn't use model groups extensively
>>> and my memory is a bit rusty.  I can try to find more info on them
>>> later if that helps.
>>> 
>>> Thanks,
>>> 
>>> mrg
>>> 
>>> On Thu, Nov 3, 2011 at 9:33 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>> What does that mean in practical terms? How do we define that "group" in the Modeler?
>>>> 
>>>> On Nov 3, 2011, at 4:25 PM, Michael Gentry wrote:
>>>> 
>>>>> EOModeler had model groups where you could reference external models.
>>>>> That's probably the approach Cayenne Modeler would need to take.
>>>>> 
>>>>> On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>>>> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>>>>>> 
>>>>>> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>>>>>> 
>>>>>> Andrus
>>>>>> 
>>>>>> 
>>>>>> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>>>>>> 
>>>>>>> Hi all!
>>>>>>> 
>>>>>>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>>>>>>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> - hugi
>>>>>>> 
>>>>>>> 
>>>>>>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>> 
> 


Re: Relationships between datamaps in different projects

Posted by Michael Gentry <mg...@masslight.net>.
Yes, I agree.  :-)

For CM, I think we'd have to allow them to identify JARs (these could
be in their .m2 repo, I suppose) which contained Cayenne models.  But
again, I haven't given it much thought.

mrg

On Thu, Nov 3, 2011 at 11:13 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
> In the Apple world everything you have is installed in /Library/Frameworks, so it is always easy to find :-)
>
> On Nov 3, 2011, at 5:28 PM, Michael Gentry wrote:
>
>> A quick Google gives this API-wise:
>>
>> http://www.spice-of-life.net/wodock/api/com/webobjects/eoaccess/EOModelGroup.html
>>
>> and this UI-wise:
>>
>> http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/index.html?http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/Forming_Rel_ata_Sources.html
>>
>> mrg
>>
>>
>> On Thu, Nov 3, 2011 at 9:46 AM, Michael Gentry <mg...@masslight.net> wrote:
>>> You'd add to CM a place to look for other other models (either a
>>> classpath approach or explicitly identify the other models).  CM
>>> wouldn't need to edit the other models, but in the relationship
>>> inspector allow referencing the other entities in the model group.  At
>>> least that's a first approach.  I didn't use model groups extensively
>>> and my memory is a bit rusty.  I can try to find more info on them
>>> later if that helps.
>>>
>>> Thanks,
>>>
>>> mrg
>>>
>>> On Thu, Nov 3, 2011 at 9:33 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>> What does that mean in practical terms? How do we define that "group" in the Modeler?
>>>>
>>>> On Nov 3, 2011, at 4:25 PM, Michael Gentry wrote:
>>>>
>>>>> EOModeler had model groups where you could reference external models.
>>>>> That's probably the approach Cayenne Modeler would need to take.
>>>>>
>>>>> On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>>>> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>>>>>>
>>>>>> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>>>>>>
>>>>>> Andrus
>>>>>>
>>>>>>
>>>>>> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>>>>>>
>>>>>>> Hi all!
>>>>>>>
>>>>>>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>>>>>>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>>>>>>
>>>>>>> Cheers,
>>>>>>> - hugi
>>>>>>>
>>>>>>>
>>>>>>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
>

Re: Relationships between datamaps in different projects

Posted by Andrus Adamchik <an...@objectstyle.org>.
But seriously in the Java world this can be quite a challenge. It would've been much easier in the context of an IDE, where all the paths to dependencies are setup already. CayenneModeler has no such context. Creating it will have to be done individually for each user (you can't commit the locations of dependencies in Cayenne XML files, as they are different from user to user). So this is doable, but not very user friendly, and this is one of the reasons we haven't pursued this path yet. 

Andrus


On Nov 3, 2011, at 6:13 PM, Andrus Adamchik wrote:

> In the Apple world everything you have is installed in /Library/Frameworks, so it is always easy to find :-)
> 
> On Nov 3, 2011, at 5:28 PM, Michael Gentry wrote:
> 
>> A quick Google gives this API-wise:
>> 
>> http://www.spice-of-life.net/wodock/api/com/webobjects/eoaccess/EOModelGroup.html
>> 
>> and this UI-wise:
>> 
>> http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/index.html?http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/Forming_Rel_ata_Sources.html
>> 
>> mrg
>> 
>> 
>> On Thu, Nov 3, 2011 at 9:46 AM, Michael Gentry <mg...@masslight.net> wrote:
>>> You'd add to CM a place to look for other other models (either a
>>> classpath approach or explicitly identify the other models).  CM
>>> wouldn't need to edit the other models, but in the relationship
>>> inspector allow referencing the other entities in the model group.  At
>>> least that's a first approach.  I didn't use model groups extensively
>>> and my memory is a bit rusty.  I can try to find more info on them
>>> later if that helps.
>>> 
>>> Thanks,
>>> 
>>> mrg
>>> 
>>> On Thu, Nov 3, 2011 at 9:33 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>> What does that mean in practical terms? How do we define that "group" in the Modeler?
>>>> 
>>>> On Nov 3, 2011, at 4:25 PM, Michael Gentry wrote:
>>>> 
>>>>> EOModeler had model groups where you could reference external models.
>>>>> That's probably the approach Cayenne Modeler would need to take.
>>>>> 
>>>>> On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>>>> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>>>>>> 
>>>>>> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>>>>>> 
>>>>>> Andrus
>>>>>> 
>>>>>> 
>>>>>> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>>>>>> 
>>>>>>> Hi all!
>>>>>>> 
>>>>>>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>>>>>>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> - hugi
>>>>>>> 
>>>>>>> 
>>>>>>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>> 
> 
> 


Re: Relationships between datamaps in different projects

Posted by Andrus Adamchik <an...@objectstyle.org>.
In the Apple world everything you have is installed in /Library/Frameworks, so it is always easy to find :-)

On Nov 3, 2011, at 5:28 PM, Michael Gentry wrote:

> A quick Google gives this API-wise:
> 
> http://www.spice-of-life.net/wodock/api/com/webobjects/eoaccess/EOModelGroup.html
> 
> and this UI-wise:
> 
> http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/index.html?http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/Forming_Rel_ata_Sources.html
> 
> mrg
> 
> 
> On Thu, Nov 3, 2011 at 9:46 AM, Michael Gentry <mg...@masslight.net> wrote:
>> You'd add to CM a place to look for other other models (either a
>> classpath approach or explicitly identify the other models).  CM
>> wouldn't need to edit the other models, but in the relationship
>> inspector allow referencing the other entities in the model group.  At
>> least that's a first approach.  I didn't use model groups extensively
>> and my memory is a bit rusty.  I can try to find more info on them
>> later if that helps.
>> 
>> Thanks,
>> 
>> mrg
>> 
>> On Thu, Nov 3, 2011 at 9:33 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>> What does that mean in practical terms? How do we define that "group" in the Modeler?
>>> 
>>> On Nov 3, 2011, at 4:25 PM, Michael Gentry wrote:
>>> 
>>>> EOModeler had model groups where you could reference external models.
>>>> That's probably the approach Cayenne Modeler would need to take.
>>>> 
>>>> On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>>> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>>>>> 
>>>>> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>>>>> 
>>>>> Andrus
>>>>> 
>>>>> 
>>>>> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>>>>> 
>>>>>> Hi all!
>>>>>> 
>>>>>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>>>>>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>>>>> 
>>>>>> Cheers,
>>>>>> - hugi
>>>>>> 
>>>>>> 
>>>>>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>> 
> 


Re: Relationships between datamaps in different projects

Posted by Michael Gentry <mg...@masslight.net>.
A quick Google gives this API-wise:

http://www.spice-of-life.net/wodock/api/com/webobjects/eoaccess/EOModelGroup.html

and this UI-wise:

http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/index.html?http://www.rdbprime.com/Documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/Forming_Rel_ata_Sources.html

mrg


On Thu, Nov 3, 2011 at 9:46 AM, Michael Gentry <mg...@masslight.net> wrote:
> You'd add to CM a place to look for other other models (either a
> classpath approach or explicitly identify the other models).  CM
> wouldn't need to edit the other models, but in the relationship
> inspector allow referencing the other entities in the model group.  At
> least that's a first approach.  I didn't use model groups extensively
> and my memory is a bit rusty.  I can try to find more info on them
> later if that helps.
>
> Thanks,
>
> mrg
>
> On Thu, Nov 3, 2011 at 9:33 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>> What does that mean in practical terms? How do we define that "group" in the Modeler?
>>
>> On Nov 3, 2011, at 4:25 PM, Michael Gentry wrote:
>>
>>> EOModeler had model groups where you could reference external models.
>>> That's probably the approach Cayenne Modeler would need to take.
>>>
>>> On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>>> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>>>>
>>>> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>>>>
>>>> Andrus
>>>>
>>>>
>>>> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>>>>
>>>>> Hi all!
>>>>>
>>>>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>>>>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>>>>
>>>>> Cheers,
>>>>> - hugi
>>>>>
>>>>>
>>>>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>>>>
>>>>
>>>
>>
>>
>

Re: Relationships between datamaps in different projects

Posted by Michael Gentry <mg...@masslight.net>.
You'd add to CM a place to look for other other models (either a
classpath approach or explicitly identify the other models).  CM
wouldn't need to edit the other models, but in the relationship
inspector allow referencing the other entities in the model group.  At
least that's a first approach.  I didn't use model groups extensively
and my memory is a bit rusty.  I can try to find more info on them
later if that helps.

Thanks,

mrg

On Thu, Nov 3, 2011 at 9:33 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
> What does that mean in practical terms? How do we define that "group" in the Modeler?
>
> On Nov 3, 2011, at 4:25 PM, Michael Gentry wrote:
>
>> EOModeler had model groups where you could reference external models.
>> That's probably the approach Cayenne Modeler would need to take.
>>
>> On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>>> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>>>
>>> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>>>
>>> Andrus
>>>
>>>
>>> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>>>
>>>> Hi all!
>>>>
>>>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>>>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>>>
>>>> Cheers,
>>>> - hugi
>>>>
>>>>
>>>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>>>
>>>
>>
>
>

Re: Relationships between datamaps in different projects

Posted by Andrus Adamchik <an...@objectstyle.org>.
What does that mean in practical terms? How do we define that "group" in the Modeler?

On Nov 3, 2011, at 4:25 PM, Michael Gentry wrote:

> EOModeler had model groups where you could reference external models.
> That's probably the approach Cayenne Modeler would need to take.
> 
> On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
>> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>> 
>> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>> 
>> Andrus
>> 
>> 
>> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>> 
>>> Hi all!
>>> 
>>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>> 
>>> Cheers,
>>> - hugi
>>> 
>>> 
>>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>> 
>> 
> 


Re: Relationships between datamaps in different projects

Posted by Michael Gentry <mg...@masslight.net>.
EOModeler had model groups where you could reference external models.
That's probably the approach Cayenne Modeler would need to take.

On Thu, Nov 3, 2011 at 9:12 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
> This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely).
>
> During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.
>
> Andrus
>
>
> On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:
>
>> Hi all!
>>
>> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
>> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
>>
>> Cheers,
>> - hugi
>>
>>
>> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)
>
>

Re: Relationships between datamaps in different projects

Posted by Andrus Adamchik <an...@objectstyle.org>.
This is one of the unsolved things. The relationships between DataMaps are supported in runtime (all DataMaps are loaded in a single namespace, so entities can reference each other freely). 

During modeling I am not sure how we can do that. We just had this discussion in my company recently, but no solution yet. If there are ideas how that can be implemented, let's discuss.

Andrus


On Nov 3, 2011, at 1:45 PM, Hugi Thordarson wrote:

> Hi all!
> 
> Most of our projects share a set of common DB tables (users, permissions etc). The code and cayenne.xml for these entities resides in a standalone project, works great.
> However, I'm wondering if I can create relationships from entities in our client projects to entities in the common project? And if so, do I have to do it in code, or is there any way for CayenneModeler to pick up the entities in the common project, so I can model the relationships in the GUI?
> 
> Cheers,
> - hugi
> 
> 
> PS:  I started a huge thread regarding outer joins, and I haven't had the time to respond yet. Preparing a massive thesis on that one ;-)