Re: using boolean qualifier Problem

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Mar 12 2006 - 08:59:34 EST

  • Next message: Mike Kienenberger: "Re: violates not-null constraint question."

    This is a limitation of the expression parser:

    http://objectstyle.org/cayenne/lists/cayenne-user/2005/11/0093.html

    you can work around this issue by changing boolean constant to a
    dynamic parameter. E.g.

    (isChecked = $checked)

    On some DBs quoting the constant may work, but that's not very portable:

    (isChecked = 'true')

    Andrus

    On Mar 12, 2006, at 3:18 AM, WONDER wrote:

    > Hello,
    >
    > i have query in the GUI.
    > ObjEntity.isChecked is java.lang.Boolean
    > DbEntity.isChecked is BIT // i changed it also to Boolean didnt help
    > In PostgreSQL table.isChecked is bool.
    >
    >
    > (password = $password) and (username = $username) and (isChecked =
    > TRUE)
    > // this gives a warning in the GUI Cayenne
    > // By executing i get the error: Can't resolve path component:
    > [Account.TRUE]
    >
    > (password = $password) and (username = $username) and (isChecked = 1)
    > // This doesnt find any result.
    >
    > So how can I handle a fixed values in the qualifier for booleans?
    >
    > Thanks.



    This archive was generated by hypermail 2.0.0 : Sun Mar 12 2006 - 08:59:39 EST