cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sid Ferreira <sid....@gmail.com>
Subject Re: How to?
Date Fri, 16 Jan 2009 13:35:36 GMT
a long

On Fri, Jan 16, 2009 at 11:32 AM, Andrus Adamchik <andrus@objectstyle.org>wrote:

> No need to scream. We are trying to help :-)
>
>  SelectQuery query = new SelectQuery(UsuariosClientes.class);
>  query.andQualifier(ExpressionFactory.matchDbExp("client_id", 7));
>  query.andQualifier(ExpressionFactory.linkeExp("username", "%a%"));
>
> I think this should do it. In your earlier example, what was
> "this.cdCliente"? Was it a client object, or just a number in some form?
>
> Andrus
>
>
>
> On Jan 16, 2009, at 3:26 PM, Sid Ferreira wrote:
>
>  SELECT * FROM users WHERE client_id = 7 AND username LIKE '%a%';
>> user table:
>> id (pk)
>> client_id (pk and fk to client table)
>> username
>>
>> I just want a dumb sql like this!
>>
>> On Fri, Jan 16, 2009 at 11:19 AM, Andrus Adamchik <andrus@objectstyle.org
>> >wrote:
>>
>>
>>> On Jan 16, 2009, at 3:14 PM, Sid Ferreira wrote:
>>>
>>>
>>>> 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.
>>>>
>>>>
>>> Dude, you are not doing a good job explaining what you are trying to do.
>>> So
>>> we are shooting in the dark with our suggestions.
>>>
>>> Andrus
>>>
>>>
>>>
>>
>> --
>> Sidney G B Ferreira
>> Desenvolvedor Web - Tibox Innovations
>>
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message