Re: How to?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jan 16 2009 - 08:32:40 EST

  • Next message: Sid Ferreira: "Re: How to?"

    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 <andru..bjectstyle.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



    This archive was generated by hypermail 2.0.0 : Fri Jan 16 2009 - 08:33:13 EST