Dude, of course I agree that the correct is to get the client and ask for
it's users wich login is like the parameter I sent.But, if I can't simply
select all users based on the parameter, it's pointless.
I mean, I can't do any SQL I want, it's a limitation much more than
helpfull.
On Fri, Jan 16, 2009 at 11:04 AM, Andrus Adamchik <andru..bjectstyle.org>wrote:
> I suspect the case here is a search based on related object (client) (?).
> So here Sid should map a relationship between users and client and use this
> relationship to fetch the users, or in more advanced cases, in a qualifier
> of the query. Sid, let us know if you need an explanation on any of the
> above.
>
> Andrus
>
>
> On Jan 16, 2009, at 3:00 PM, Aristedes Maniatis wrote:
>
>
>> On 16/01/2009, at 11:41 PM, Sid Ferreira wrote:
>>
>> I want select all users belonging to client number 7in the user table
>>> client's id (CD_CLIENTE) is a Primary Foreign Key.
>>>
>>
>>
>> Perhaps that's where you aren't using Cayenne in the best way. It should
>> be quite rare to need to search for a record by PK; in fact the whole point
>> of Cayenne is to ensure that you don't need to do that. If you are really
>> sure you need to, then use these methods:
>>
>> http://cayenne.apache.org/doc/dataobjectutils.html
>>
>>
>> Ari
>>
>>
>>
>>
>> -------------------------->
>> ish
>> http://www.ish.com.au
>> Level 1, 30 Wilson Street Newtown 2042 Australia
>> phone +61 2 9550 5001 fax +61 2 9550 4001
>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
>>
>>
>>
>>
>
-- Sidney G B Ferreira Desenvolvedor Web - Tibox Innovations
This archive was generated by hypermail 2.0.0 : Fri Jan 16 2009 - 08:14:34 EST