You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Bruno René Santos <br...@holos.pt> on 2011/09/21 16:49:58 UTC

Complex RelationShip in Modeler vs in Code

Hello all,

I have created a complex relationship within the Modeler (like
toPerson->telephoneNumberArray). My problem is that when I access the
property the array comes up empty but if at the same time I call the
getPerson().getTelephoneNumberArray() it returns results... When are these
relationships within the modeler updated? And how they relate to the
comparable java call?

Thanx
Bruno

-- 
Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
Programador | Investigador

Holos - Soluções Avançadas em Tecnologias de Informação S.A.
Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient or the person responsible for
delivering the email to the intended recipient, be advised that you have
received this email in error and that any use, dissemination, forwarding,
printing, or copying of this email is strictly prohibited. If you have
received this email in error please notify Bruno René Santos by telephone on
+351 210 438 686

Re: Complex RelationShip in Modeler vs in Code

Posted by Michael Gentry <mg...@masslight.net>.
Probably.  I'll try to remember to do that at home and attach my test
project as a demo/example of the issue.

On Mon, Sep 26, 2011 at 6:10 AM, Bruno René Santos <br...@holos.pt> wrote:
> It seems like a bug yes... Do you think A ticket should be created?
>
> Thanx
> Bruno
>
> No dia 24 de Set de 2011 15:36, "Michael Gentry" <mg...@masslight.net>
> escreveu:
>> Hi Bruno,
>>
>> I just wrote a small test-case which used:
>>
>> Source -> Middle ->> Target
>>
>> Using source.getMiddle().getTargets() succeeds, but using
>> source.getFlattenedTargets() fails. The faults are never triggered so
>> the data is never faulted in from the database. This seems like a
>> bug.
>>
>> Two options:
>>
>> 1) Add a prefetch to your query to force the Target to be present:
>> query.addPrefetch(Source.FLATTENED_TARGETS_PROPERTY);
>> 2) Add a cover method in Source.java to fetch Targets lazily and not
>> even model the flattened relationship.
>>
>> Hope that helps for now.
>>
>> mrg
>>
>> On Fri, Sep 23, 2011 at 12:17 PM, Bruno René Santos <br...@holos.pt>
> wrote:
>>> Hi Michael,
>>>
>>> I dont mind having read-only relationships.
>>> The problem here is that I have a flattened relationship that returns an
>>> empty set when its unflattened counterpart returns values....
>>>
>>> Thanx
>>> Bruno
>>>
>>> On Fri, Sep 23, 2011 at 4:26 PM, Michael Gentry <mgentry@masslight.net
>>wrote:
>>>
>>>> Hi Bruno,
>>>>
>>>> I got the screenshot.  It looks like you are trying to flatten the
>>>> relationship in the modeler:
>>>>
>>>>
> http://cayenne.apache.org/doc30/cayennemodeler-flattened-relationships.html
>>>>
>>>> I haven't done this often, but it should work.  Play around with it a
>>>> bit more.  Also, keep in mind this is going to give you read-only
>>>> records, which may not be what you are wanting.
>>>>
>>>> mrg
>>>>
>>>>
>>>> On Fri, Sep 23, 2011 at 9:21 AM, Bruno René Santos <br...@holos.pt>
>>>> wrote:
>>>> > Hi Michael I dont know if we are talking about the same thing but what
> I
>>>> did
>>>> > was use the Cayenne Modeler to create a method getCausaArray() (see
> image
>>>> in
>>>> > attach.) which should be the same as
>>>> > getToAvaliacaoMetrica().getCausaArray()... But for me the first is
> empty
>>>> and
>>>> > the second is not...
>>>> >
>>>> > Thanx
>>>> > Bruno
>>>> >
>>>> > On Fri, Sep 23, 2011 at 1:22 PM, Michael Gentry <mgentry@masslight.net
>>
>>>> > wrote:
>>>> >>
>>>> >> Hi Bruno,
>>>> >>
>>>> >> I might be mistaken, but it sounds like you are saying when you used
>>>> >> readNestedProperty() you ended up with an empty array, but when you
>>>> >> used getPerson().getTelephoneNumberArray() it worked?  If so, make
>>>> >> sure you are using the right property names and syntax in
>>>> >> readNestedProperty().
>>>> >>
>>>> >> Thanks,
>>>> >>
>>>> >> mrg
>>>> >>
>>>> >>
>>>> >> On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <
> brunorene@holos.pt
>>>> >
>>>> >> wrote:
>>>> >> > Hello all,
>>>> >> >
>>>> >> > I have created a complex relationship within the Modeler (like
>>>> >> > toPerson->telephoneNumberArray). My problem is that when I access
> the
>>>> >> > property the array comes up empty but if at the same time I call
> the
>>>> >> > getPerson().getTelephoneNumberArray() it returns results... When
> are
>>>> >> > these
>>>> >> > relationships within the modeler updated? And how they relate to
> the
>>>> >> > comparable java call?
>>>> >> >
>>>> >> > Thanx
>>>> >> > Bruno
>>>> >> >
>>>> >> > --
>>>> >> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
>>>> Analista
>>>> >> > |
>>>> >> > Programador | Investigador
>>>> >> >
>>>> >> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>>>> >> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
>>>> Parque
>>>> >> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica .
> Portugal
>>>> >> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>>>> >> >
>>>> >> > This email and any files transmitted with it are confidential and
>>>> >> > intended
>>>> >> > solely for the use of the individual or entity to whom they are
>>>> >> > addressed.
>>>> >> > If you are not the intended recipient or the person responsible for
>>>> >> > delivering the email to the intended recipient, be advised that you
>>>> have
>>>> >> > received this email in error and that any use, dissemination,
>>>> >> > forwarding,
>>>> >> > printing, or copying of this email is strictly prohibited. If you
> have
>>>> >> > received this email in error please notify Bruno René Santos by
>>>> >> > telephone on
>>>> >> > +351 210 438 686
>>>> >> >
>>>> >>
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
> Analista
>>>> |
>>>> > Programador | Investigador
>>>> >
>>>> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>>>> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
> Parque
>>>> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>>>> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>>>> >
>>>> > This email and any files transmitted with it are confidential and
>>>> intended
>>>> > solely for the use of the individual or entity to whom they are
>>>> addressed.
>>>> > If you are not the intended recipient or the person responsible for
>>>> > delivering the email to the intended recipient, be advised that you
> have
>>>> > received this email in error and that any use, dissemination,
> forwarding,
>>>> > printing, or copying of this email is strictly prohibited. If you have
>>>> > received this email in error please notify Bruno René Santos by
> telephone
>>>> on
>>>> > +351 210 438 686
>>>> >
>>>>
>>>>
>>>
>>>
>>> --
>>> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
>>> Programador | Investigador
>>>
>>> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>>> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
>>> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>>> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>>>
>>> This email and any files transmitted with it are confidential and
> intended
>>> solely for the use of the individual or entity to whom they are
> addressed.
>>> If you are not the intended recipient or the person responsible for
>>> delivering the email to the intended recipient, be advised that you have
>>> received this email in error and that any use, dissemination, forwarding,
>>> printing, or copying of this email is strictly prohibited. If you have
>>> received this email in error please notify Bruno René Santos by telephone
> on
>>> +351 210 438 686
>>>
>>
>

Re: Complex RelationShip in Modeler vs in Code

Posted by Bruno René Santos <br...@holos.pt>.
It seems like a bug yes... Do you think A ticket should be created?

Thanx
Bruno

No dia 24 de Set de 2011 15:36, "Michael Gentry" <mg...@masslight.net>
escreveu:
> Hi Bruno,
>
> I just wrote a small test-case which used:
>
> Source -> Middle ->> Target
>
> Using source.getMiddle().getTargets() succeeds, but using
> source.getFlattenedTargets() fails. The faults are never triggered so
> the data is never faulted in from the database. This seems like a
> bug.
>
> Two options:
>
> 1) Add a prefetch to your query to force the Target to be present:
> query.addPrefetch(Source.FLATTENED_TARGETS_PROPERTY);
> 2) Add a cover method in Source.java to fetch Targets lazily and not
> even model the flattened relationship.
>
> Hope that helps for now.
>
> mrg
>
> On Fri, Sep 23, 2011 at 12:17 PM, Bruno René Santos <br...@holos.pt>
wrote:
>> Hi Michael,
>>
>> I dont mind having read-only relationships.
>> The problem here is that I have a flattened relationship that returns an
>> empty set when its unflattened counterpart returns values....
>>
>> Thanx
>> Bruno
>>
>> On Fri, Sep 23, 2011 at 4:26 PM, Michael Gentry <mgentry@masslight.net
>wrote:
>>
>>> Hi Bruno,
>>>
>>> I got the screenshot.  It looks like you are trying to flatten the
>>> relationship in the modeler:
>>>
>>>
http://cayenne.apache.org/doc30/cayennemodeler-flattened-relationships.html
>>>
>>> I haven't done this often, but it should work.  Play around with it a
>>> bit more.  Also, keep in mind this is going to give you read-only
>>> records, which may not be what you are wanting.
>>>
>>> mrg
>>>
>>>
>>> On Fri, Sep 23, 2011 at 9:21 AM, Bruno René Santos <br...@holos.pt>
>>> wrote:
>>> > Hi Michael I dont know if we are talking about the same thing but what
I
>>> did
>>> > was use the Cayenne Modeler to create a method getCausaArray() (see
image
>>> in
>>> > attach.) which should be the same as
>>> > getToAvaliacaoMetrica().getCausaArray()... But for me the first is
empty
>>> and
>>> > the second is not...
>>> >
>>> > Thanx
>>> > Bruno
>>> >
>>> > On Fri, Sep 23, 2011 at 1:22 PM, Michael Gentry <mgentry@masslight.net
>
>>> > wrote:
>>> >>
>>> >> Hi Bruno,
>>> >>
>>> >> I might be mistaken, but it sounds like you are saying when you used
>>> >> readNestedProperty() you ended up with an empty array, but when you
>>> >> used getPerson().getTelephoneNumberArray() it worked?  If so, make
>>> >> sure you are using the right property names and syntax in
>>> >> readNestedProperty().
>>> >>
>>> >> Thanks,
>>> >>
>>> >> mrg
>>> >>
>>> >>
>>> >> On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <
brunorene@holos.pt
>>> >
>>> >> wrote:
>>> >> > Hello all,
>>> >> >
>>> >> > I have created a complex relationship within the Modeler (like
>>> >> > toPerson->telephoneNumberArray). My problem is that when I access
the
>>> >> > property the array comes up empty but if at the same time I call
the
>>> >> > getPerson().getTelephoneNumberArray() it returns results... When
are
>>> >> > these
>>> >> > relationships within the modeler updated? And how they relate to
the
>>> >> > comparable java call?
>>> >> >
>>> >> > Thanx
>>> >> > Bruno
>>> >> >
>>> >> > --
>>> >> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
>>> Analista
>>> >> > |
>>> >> > Programador | Investigador
>>> >> >
>>> >> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>>> >> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
>>> Parque
>>> >> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica .
Portugal
>>> >> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>>> >> >
>>> >> > This email and any files transmitted with it are confidential and
>>> >> > intended
>>> >> > solely for the use of the individual or entity to whom they are
>>> >> > addressed.
>>> >> > If you are not the intended recipient or the person responsible for
>>> >> > delivering the email to the intended recipient, be advised that you
>>> have
>>> >> > received this email in error and that any use, dissemination,
>>> >> > forwarding,
>>> >> > printing, or copying of this email is strictly prohibited. If you
have
>>> >> > received this email in error please notify Bruno René Santos by
>>> >> > telephone on
>>> >> > +351 210 438 686
>>> >> >
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
Analista
>>> |
>>> > Programador | Investigador
>>> >
>>> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>>> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
Parque
>>> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>>> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>>> >
>>> > This email and any files transmitted with it are confidential and
>>> intended
>>> > solely for the use of the individual or entity to whom they are
>>> addressed.
>>> > If you are not the intended recipient or the person responsible for
>>> > delivering the email to the intended recipient, be advised that you
have
>>> > received this email in error and that any use, dissemination,
forwarding,
>>> > printing, or copying of this email is strictly prohibited. If you have
>>> > received this email in error please notify Bruno René Santos by
telephone
>>> on
>>> > +351 210 438 686
>>> >
>>>
>>>
>>
>>
>> --
>> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
>> Programador | Investigador
>>
>> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
>> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>>
>> This email and any files transmitted with it are confidential and
intended
>> solely for the use of the individual or entity to whom they are
addressed.
>> If you are not the intended recipient or the person responsible for
>> delivering the email to the intended recipient, be advised that you have
>> received this email in error and that any use, dissemination, forwarding,
>> printing, or copying of this email is strictly prohibited. If you have
>> received this email in error please notify Bruno René Santos by telephone
on
>> +351 210 438 686
>>
>

Re: Handling dialog ENTER and ESC

Posted by Tomas Stenlund <to...@telia.com>.
Oh, I'm terribly sorry. I posted this in the wrong userlist - pressed 
the wrong button. I meant it to go to pivot not cayenne.

But I must say, it is a good combo (cayenne and pivot).

Sorry guys - I'm embarrassed,

Tomas

On 09/25/2011 10:42 AM, Tomas Stenlund wrote:
> Hi,
>
> I'm after a design/code pattern for handling ENTER and ESC for dialogs 
> (modal) as well as PushButtons performing the same function. When I 
> press ENTER or ESC the dialog is closed and I can find out in the 
> DialogStateListener which one was pressed (true,false) which I guess 
> is the default behaviour of pivot. There I can get the dialog result 
> to see if I should "commit" or "rollback" the changes in the dialog or 
> not ( I use Cayenne ORM). I also have pushbuttons in the dialog that 
> will yield the same functionality, i.e. close the dialog and send a 
> true/false result.
>
> Now to my question, I was thinking of vetoing the close if the dialog 
> values are not correct, but I cannot determine if it is ENTER, ESCAPE 
> or the pushbuttons that caused the "close". I need to know that 
> because if Cancel  or ESC was pressed I will never veto the close.
>
> Hmm a little unstructured there, but how do you go about doing this 
> i.e. handling the keyboard ENTER, ESC as well as pushbuttons that does 
> the same functionality ?
>
> Thanks for any help,
>
> Tomas
>
>
>
>


Handling dialog ENTER and ESC

Posted by Tomas Stenlund <to...@telia.com>.
Hi,

I'm after a design/code pattern for handling ENTER and ESC for dialogs 
(modal) as well as PushButtons performing the same function. When I 
press ENTER or ESC the dialog is closed and I can find out in the 
DialogStateListener which one was pressed (true,false) which I guess is 
the default behaviour of pivot. There I can get the dialog result to see 
if I should "commit" or "rollback" the changes in the dialog or not ( I 
use Cayenne ORM). I also have pushbuttons in the dialog that will yield 
the same functionality, i.e. close the dialog and send a true/false result.

Now to my question, I was thinking of vetoing the close if the dialog 
values are not correct, but I cannot determine if it is ENTER, ESCAPE or 
the pushbuttons that caused the "close". I need to know that because if 
Cancel  or ESC was pressed I will never veto the close.

Hmm a little unstructured there, but how do you go about doing this i.e. 
handling the keyboard ENTER, ESC as well as pushbuttons that does the 
same functionality ?

Thanks for any help,

Tomas




Re: Complex RelationShip in Modeler vs in Code

Posted by Michael Gentry <mg...@masslight.net>.
Hi Bruno,

I just wrote a small test-case which used:

Source -> Middle ->> Target

Using source.getMiddle().getTargets() succeeds, but using
source.getFlattenedTargets() fails.  The faults are never triggered so
the data is never faulted in from the database.  This seems like a
bug.

Two options:

1) Add a prefetch to your query to force the Target to be present:
query.addPrefetch(Source.FLATTENED_TARGETS_PROPERTY);
2) Add a cover method in Source.java to fetch Targets lazily and not
even model the flattened relationship.

Hope that helps for now.

mrg

On Fri, Sep 23, 2011 at 12:17 PM, Bruno René Santos <br...@holos.pt> wrote:
> Hi Michael,
>
> I dont mind having read-only relationships.
> The problem here is that I have a flattened relationship that returns an
> empty set when its unflattened counterpart returns values....
>
> Thanx
> Bruno
>
> On Fri, Sep 23, 2011 at 4:26 PM, Michael Gentry <mg...@masslight.net>wrote:
>
>> Hi Bruno,
>>
>> I got the screenshot.  It looks like you are trying to flatten the
>> relationship in the modeler:
>>
>> http://cayenne.apache.org/doc30/cayennemodeler-flattened-relationships.html
>>
>> I haven't done this often, but it should work.  Play around with it a
>> bit more.  Also, keep in mind this is going to give you read-only
>> records, which may not be what you are wanting.
>>
>> mrg
>>
>>
>> On Fri, Sep 23, 2011 at 9:21 AM, Bruno René Santos <br...@holos.pt>
>> wrote:
>> > Hi Michael I dont know if we are talking about the same thing but what I
>> did
>> > was use the Cayenne Modeler to create a method getCausaArray() (see image
>> in
>> > attach.) which should be the same as
>> > getToAvaliacaoMetrica().getCausaArray()... But for me the first is empty
>> and
>> > the second is not...
>> >
>> > Thanx
>> > Bruno
>> >
>> > On Fri, Sep 23, 2011 at 1:22 PM, Michael Gentry <mg...@masslight.net>
>> > wrote:
>> >>
>> >> Hi Bruno,
>> >>
>> >> I might be mistaken, but it sounds like you are saying when you used
>> >> readNestedProperty() you ended up with an empty array, but when you
>> >> used getPerson().getTelephoneNumberArray() it worked?  If so, make
>> >> sure you are using the right property names and syntax in
>> >> readNestedProperty().
>> >>
>> >> Thanks,
>> >>
>> >> mrg
>> >>
>> >>
>> >> On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <brunorene@holos.pt
>> >
>> >> wrote:
>> >> > Hello all,
>> >> >
>> >> > I have created a complex relationship within the Modeler (like
>> >> > toPerson->telephoneNumberArray). My problem is that when I access the
>> >> > property the array comes up empty but if at the same time I call the
>> >> > getPerson().getTelephoneNumberArray() it returns results... When are
>> >> > these
>> >> > relationships within the modeler updated? And how they relate to the
>> >> > comparable java call?
>> >> >
>> >> > Thanx
>> >> > Bruno
>> >> >
>> >> > --
>> >> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
>> Analista
>> >> > |
>> >> > Programador | Investigador
>> >> >
>> >> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>> >> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
>> Parque
>> >> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>> >> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>> >> >
>> >> > This email and any files transmitted with it are confidential and
>> >> > intended
>> >> > solely for the use of the individual or entity to whom they are
>> >> > addressed.
>> >> > If you are not the intended recipient or the person responsible for
>> >> > delivering the email to the intended recipient, be advised that you
>> have
>> >> > received this email in error and that any use, dissemination,
>> >> > forwarding,
>> >> > printing, or copying of this email is strictly prohibited. If you have
>> >> > received this email in error please notify Bruno René Santos by
>> >> > telephone on
>> >> > +351 210 438 686
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista
>> |
>> > Programador | Investigador
>> >
>> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
>> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>> >
>> > This email and any files transmitted with it are confidential and
>> intended
>> > solely for the use of the individual or entity to whom they are
>> addressed.
>> > If you are not the intended recipient or the person responsible for
>> > delivering the email to the intended recipient, be advised that you have
>> > received this email in error and that any use, dissemination, forwarding,
>> > printing, or copying of this email is strictly prohibited. If you have
>> > received this email in error please notify Bruno René Santos by telephone
>> on
>> > +351 210 438 686
>> >
>>
>>
>
>
> --
> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
> Programador | Investigador
>
> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you are not the intended recipient or the person responsible for
> delivering the email to the intended recipient, be advised that you have
> received this email in error and that any use, dissemination, forwarding,
> printing, or copying of this email is strictly prohibited. If you have
> received this email in error please notify Bruno René Santos by telephone on
> +351 210 438 686
>

Re: Complex RelationShip in Modeler vs in Code

Posted by Bruno René Santos <br...@holos.pt>.
Hi Michael,

I dont mind having read-only relationships.
The problem here is that I have a flattened relationship that returns an
empty set when its unflattened counterpart returns values....

Thanx
Bruno

On Fri, Sep 23, 2011 at 4:26 PM, Michael Gentry <mg...@masslight.net>wrote:

> Hi Bruno,
>
> I got the screenshot.  It looks like you are trying to flatten the
> relationship in the modeler:
>
> http://cayenne.apache.org/doc30/cayennemodeler-flattened-relationships.html
>
> I haven't done this often, but it should work.  Play around with it a
> bit more.  Also, keep in mind this is going to give you read-only
> records, which may not be what you are wanting.
>
> mrg
>
>
> On Fri, Sep 23, 2011 at 9:21 AM, Bruno René Santos <br...@holos.pt>
> wrote:
> > Hi Michael I dont know if we are talking about the same thing but what I
> did
> > was use the Cayenne Modeler to create a method getCausaArray() (see image
> in
> > attach.) which should be the same as
> > getToAvaliacaoMetrica().getCausaArray()... But for me the first is empty
> and
> > the second is not...
> >
> > Thanx
> > Bruno
> >
> > On Fri, Sep 23, 2011 at 1:22 PM, Michael Gentry <mg...@masslight.net>
> > wrote:
> >>
> >> Hi Bruno,
> >>
> >> I might be mistaken, but it sounds like you are saying when you used
> >> readNestedProperty() you ended up with an empty array, but when you
> >> used getPerson().getTelephoneNumberArray() it worked?  If so, make
> >> sure you are using the right property names and syntax in
> >> readNestedProperty().
> >>
> >> Thanks,
> >>
> >> mrg
> >>
> >>
> >> On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <brunorene@holos.pt
> >
> >> wrote:
> >> > Hello all,
> >> >
> >> > I have created a complex relationship within the Modeler (like
> >> > toPerson->telephoneNumberArray). My problem is that when I access the
> >> > property the array comes up empty but if at the same time I call the
> >> > getPerson().getTelephoneNumberArray() it returns results... When are
> >> > these
> >> > relationships within the modeler updated? And how they relate to the
> >> > comparable java call?
> >> >
> >> > Thanx
> >> > Bruno
> >> >
> >> > --
> >> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
> Analista
> >> > |
> >> > Programador | Investigador
> >> >
> >> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> >> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
> Parque
> >> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> >> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
> >> >
> >> > This email and any files transmitted with it are confidential and
> >> > intended
> >> > solely for the use of the individual or entity to whom they are
> >> > addressed.
> >> > If you are not the intended recipient or the person responsible for
> >> > delivering the email to the intended recipient, be advised that you
> have
> >> > received this email in error and that any use, dissemination,
> >> > forwarding,
> >> > printing, or copying of this email is strictly prohibited. If you have
> >> > received this email in error please notify Bruno René Santos by
> >> > telephone on
> >> > +351 210 438 686
> >> >
> >>
> >
> >
> >
> > --
> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista
> |
> > Programador | Investigador
> >
> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
> >
> > This email and any files transmitted with it are confidential and
> intended
> > solely for the use of the individual or entity to whom they are
> addressed.
> > If you are not the intended recipient or the person responsible for
> > delivering the email to the intended recipient, be advised that you have
> > received this email in error and that any use, dissemination, forwarding,
> > printing, or copying of this email is strictly prohibited. If you have
> > received this email in error please notify Bruno René Santos by telephone
> on
> > +351 210 438 686
> >
>
>


-- 
Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
Programador | Investigador

Holos - Soluções Avançadas em Tecnologias de Informação S.A.
Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient or the person responsible for
delivering the email to the intended recipient, be advised that you have
received this email in error and that any use, dissemination, forwarding,
printing, or copying of this email is strictly prohibited. If you have
received this email in error please notify Bruno René Santos by telephone on
+351 210 438 686

Re: Complex RelationShip in Modeler vs in Code

Posted by Michael Gentry <mg...@masslight.net>.
Hi Bruno,

I got the screenshot.  It looks like you are trying to flatten the
relationship in the modeler:

http://cayenne.apache.org/doc30/cayennemodeler-flattened-relationships.html

I haven't done this often, but it should work.  Play around with it a
bit more.  Also, keep in mind this is going to give you read-only
records, which may not be what you are wanting.

mrg


On Fri, Sep 23, 2011 at 9:21 AM, Bruno René Santos <br...@holos.pt> wrote:
> Hi Michael I dont know if we are talking about the same thing but what I did
> was use the Cayenne Modeler to create a method getCausaArray() (see image in
> attach.) which should be the same as
> getToAvaliacaoMetrica().getCausaArray()... But for me the first is empty and
> the second is not...
>
> Thanx
> Bruno
>
> On Fri, Sep 23, 2011 at 1:22 PM, Michael Gentry <mg...@masslight.net>
> wrote:
>>
>> Hi Bruno,
>>
>> I might be mistaken, but it sounds like you are saying when you used
>> readNestedProperty() you ended up with an empty array, but when you
>> used getPerson().getTelephoneNumberArray() it worked?  If so, make
>> sure you are using the right property names and syntax in
>> readNestedProperty().
>>
>> Thanks,
>>
>> mrg
>>
>>
>> On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <br...@holos.pt>
>> wrote:
>> > Hello all,
>> >
>> > I have created a complex relationship within the Modeler (like
>> > toPerson->telephoneNumberArray). My problem is that when I access the
>> > property the array comes up empty but if at the same time I call the
>> > getPerson().getTelephoneNumberArray() it returns results... When are
>> > these
>> > relationships within the modeler updated? And how they relate to the
>> > comparable java call?
>> >
>> > Thanx
>> > Bruno
>> >
>> > --
>> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista
>> > |
>> > Programador | Investigador
>> >
>> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
>> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>> >
>> > This email and any files transmitted with it are confidential and
>> > intended
>> > solely for the use of the individual or entity to whom they are
>> > addressed.
>> > If you are not the intended recipient or the person responsible for
>> > delivering the email to the intended recipient, be advised that you have
>> > received this email in error and that any use, dissemination,
>> > forwarding,
>> > printing, or copying of this email is strictly prohibited. If you have
>> > received this email in error please notify Bruno René Santos by
>> > telephone on
>> > +351 210 438 686
>> >
>>
>
>
>
> --
> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
> Programador | Investigador
>
> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you are not the intended recipient or the person responsible for
> delivering the email to the intended recipient, be advised that you have
> received this email in error and that any use, dissemination, forwarding,
> printing, or copying of this email is strictly prohibited. If you have
> received this email in error please notify Bruno René Santos by telephone on
> +351 210 438 686
>

Re: Complex RelationShip in Modeler vs in Code

Posted by Michael Gentry <mg...@masslight.net>.
Hi Bruno,

We may not be talking about the same thing.  Also, the mailing lists
don't do attachments.  You can e-mail the image directly to me if
you'd like, though, and I'll take a look at it.

Thanks,

mrg


On Fri, Sep 23, 2011 at 9:21 AM, Bruno René Santos <br...@holos.pt> wrote:
> Hi Michael I dont know if we are talking about the same thing but what I did
> was use the Cayenne Modeler to create a method getCausaArray() (see image in
> attach.) which should be the same as
> getToAvaliacaoMetrica().getCausaArray()... But for me the first is empty and
> the second is not...
>
> Thanx
> Bruno
>
> On Fri, Sep 23, 2011 at 1:22 PM, Michael Gentry <mg...@masslight.net>
> wrote:
>>
>> Hi Bruno,
>>
>> I might be mistaken, but it sounds like you are saying when you used
>> readNestedProperty() you ended up with an empty array, but when you
>> used getPerson().getTelephoneNumberArray() it worked?  If so, make
>> sure you are using the right property names and syntax in
>> readNestedProperty().
>>
>> Thanks,
>>
>> mrg
>>
>>
>> On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <br...@holos.pt>
>> wrote:
>> > Hello all,
>> >
>> > I have created a complex relationship within the Modeler (like
>> > toPerson->telephoneNumberArray). My problem is that when I access the
>> > property the array comes up empty but if at the same time I call the
>> > getPerson().getTelephoneNumberArray() it returns results... When are
>> > these
>> > relationships within the modeler updated? And how they relate to the
>> > comparable java call?
>> >
>> > Thanx
>> > Bruno
>> >
>> > --
>> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista
>> > |
>> > Programador | Investigador
>> >
>> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
>> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
>> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
>> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>> >
>> > This email and any files transmitted with it are confidential and
>> > intended
>> > solely for the use of the individual or entity to whom they are
>> > addressed.
>> > If you are not the intended recipient or the person responsible for
>> > delivering the email to the intended recipient, be advised that you have
>> > received this email in error and that any use, dissemination,
>> > forwarding,
>> > printing, or copying of this email is strictly prohibited. If you have
>> > received this email in error please notify Bruno René Santos by
>> > telephone on
>> > +351 210 438 686
>> >
>>
>
>
>
> --
> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
> Programador | Investigador
>
> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you are not the intended recipient or the person responsible for
> delivering the email to the intended recipient, be advised that you have
> received this email in error and that any use, dissemination, forwarding,
> printing, or copying of this email is strictly prohibited. If you have
> received this email in error please notify Bruno René Santos by telephone on
> +351 210 438 686
>

Re: Complex RelationShip in Modeler vs in Code

Posted by Bruno René Santos <br...@holos.pt>.
Hi Michael I dont know if we are talking about the same thing but what I did
was use the Cayenne Modeler to create a method getCausaArray() (see image in
attach.) which should be the same as
getToAvaliacaoMetrica().getCausaArray()... But for me the first is empty and
the second is not...

Thanx
Bruno

On Fri, Sep 23, 2011 at 1:22 PM, Michael Gentry <mg...@masslight.net>wrote:

> Hi Bruno,
>
> I might be mistaken, but it sounds like you are saying when you used
> readNestedProperty() you ended up with an empty array, but when you
> used getPerson().getTelephoneNumberArray() it worked?  If so, make
> sure you are using the right property names and syntax in
> readNestedProperty().
>
> Thanks,
>
> mrg
>
>
> On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <br...@holos.pt>
> wrote:
> > Hello all,
> >
> > I have created a complex relationship within the Modeler (like
> > toPerson->telephoneNumberArray). My problem is that when I access the
> > property the array comes up empty but if at the same time I call the
> > getPerson().getTelephoneNumberArray() it returns results... When are
> these
> > relationships within the modeler updated? And how they relate to the
> > comparable java call?
> >
> > Thanx
> > Bruno
> >
> > --
> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista
> |
> > Programador | Investigador
> >
> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
> >
> > This email and any files transmitted with it are confidential and
> intended
> > solely for the use of the individual or entity to whom they are
> addressed.
> > If you are not the intended recipient or the person responsible for
> > delivering the email to the intended recipient, be advised that you have
> > received this email in error and that any use, dissemination, forwarding,
> > printing, or copying of this email is strictly prohibited. If you have
> > received this email in error please notify Bruno René Santos by telephone
> on
> > +351 210 438 686
> >
>
>


-- 
Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
Programador | Investigador

Holos - Soluções Avançadas em Tecnologias de Informação S.A.
Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient or the person responsible for
delivering the email to the intended recipient, be advised that you have
received this email in error and that any use, dissemination, forwarding,
printing, or copying of this email is strictly prohibited. If you have
received this email in error please notify Bruno René Santos by telephone on
+351 210 438 686

Re: Complex RelationShip in Modeler vs in Code

Posted by Michael Gentry <mg...@masslight.net>.
Hi Bruno,

I might be mistaken, but it sounds like you are saying when you used
readNestedProperty() you ended up with an empty array, but when you
used getPerson().getTelephoneNumberArray() it worked?  If so, make
sure you are using the right property names and syntax in
readNestedProperty().

Thanks,

mrg


On Wed, Sep 21, 2011 at 10:49 AM, Bruno René Santos <br...@holos.pt> wrote:
> Hello all,
>
> I have created a complex relationship within the Modeler (like
> toPerson->telephoneNumberArray). My problem is that when I access the
> property the array comes up empty but if at the same time I call the
> getPerson().getTelephoneNumberArray() it returns results... When are these
> relationships within the modeler updated? And how they relate to the
> comparable java call?
>
> Thanx
> Bruno
>
> --
> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
> Programador | Investigador
>
> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
>
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you are not the intended recipient or the person responsible for
> delivering the email to the intended recipient, be advised that you have
> received this email in error and that any use, dissemination, forwarding,
> printing, or copying of this email is strictly prohibited. If you have
> received this email in error please notify Bruno René Santos by telephone on
> +351 210 438 686
>