stéphane Lestoclet | 2 Nov 2011 21:58
Picon
Favicon

persistent entities names

hi,

for every persistent entity, there is a class automatically generated (its name starts with underscore "_"),
in those classes, we define property names as static final strings but they are never used by the methods :
readProperty and writeProperty..
why ?
Robert Zeigler | 2 Nov 2011 22:02

Re: persistent entities names

Primarily because the static final strings are assigned to a $propertyName variable value in the
template... and so are the strings in readProperty and writeProperty.  Since it's an auto-generated
class, there isn't much point to using the static string declarations in the read/write properties. The
static variables are there as a convenience to user-code, so you don't have to hard-code the property
names (and you get to utilize code completion in your IDE), a convenience that I greatly miss when using
hibernate. :)

Robert

On Nov 2, 2011, at 11/23:58 PM , stéphane Lestoclet wrote:

> hi,
> 
> for every persistent entity, there is a class automatically generated (its name starts with underscore "_"),
> in those classes, we define property names as static final strings but they are never used by the methods :
> readProperty and writeProperty..
> why ?

Michael Gentry | 3 Nov 2011 00:56
Favicon

Re: persistent entities names

I've been meaning to fix that in the template for ages now, but keep
forgetting.  There isn't any hidden reason for not using the
constants, I just haven't updated the template to use them.

mrg

On Wed, Nov 2, 2011 at 4:58 PM, stéphane Lestoclet
<stephane.lestoclet <at> yahoo.fr> wrote:
> hi,
>
> for every persistent entity, there is a class automatically generated (its name starts with underscore "_"),
> in those classes, we define property names as static final strings but they are never used by the methods :
> readProperty and writeProperty..
> why ?
>

Hugi Thordarson | 3 Nov 2011 11:45
Picon

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 ;-)
Andrus Adamchik | 3 Nov 2011 14:12
Favicon

Re: Relationships between datamaps in different projects

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 ;-)

Michael Gentry | 3 Nov 2011 14:25
Favicon

Re: Relationships between datamaps in different projects

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 <andrus <at> 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 ;-)
>
(Continue reading)

Andrus Adamchik | 3 Nov 2011 14:33
Favicon

Re: Relationships between datamaps in different projects

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 <andrus <at> 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
>>> 
(Continue reading)

Michael Gentry | 3 Nov 2011 14:46
Favicon

Re: Relationships between datamaps in different projects

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 <andrus <at> 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 <andrus <at> 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
>>>
>>>
(Continue reading)

Michael Gentry | 3 Nov 2011 15:28
Favicon

Re: Relationships between datamaps in different projects

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 <mgentry <at> 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 <andrus <at> 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.
(Continue reading)

Andrus Adamchik | 3 Nov 2011 16:13
Favicon

Re: Relationships between datamaps in different projects

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 <mgentry <at> 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 <andrus <at> objectstyle.org> wrote:
>>> What does that mean in practical terms? How do we define that "group" in the Modeler?
(Continue reading)


Gmane