SelectQuery.queryWithParameters(ignoreMismatch)

From: Gili (cowwo..bs.darktech.org)
Date: Thu Sep 08 2005 - 23:35:31 EDT

  • Next message: Andrus Adamchik: "Re: Linking two unregistered CayenneDataObjects"

    Hi,

            I'd like to propose we modify

    queryWithParameters(java.util.Map parameters, boolean pruneMissing)

            to

    queryWithParameters(java.util.Map parameters, boolean ignoreMismatch)

            where "ignoreMismatch" is the equivilent of "pruneMissing" as well as
    ignoring when the user provides too many parameters.

            I bring this up because I ran into a situation where I was running a
    SelectQuery and it was consistently failing to behave as I expected.
    After further investigation I noticed that my mapped SelectQuery's
    qualifier string was incorrect. Something as simple as a typo in the
    qualifier string is enough to cause the query to fail silently.

            We should be able to execute in some sort of "strict mode" where
    Cayenne throws an exception if too little or too many parameters are
    provided (frankly, I'd love for strict mode to be the default -- right
    now the opposite is true). I'm willing to work on this if you guys okay
    this change. What do you think?

    Gili

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Thu Sep 08 2005 - 23:35:28 EDT