Binding queries to ObjEntity

From: Gili (cowwo..bs.darktech.org)
Date: Mon Sep 05 2005 - 15:02:06 EDT

  • Next message: Cris Daniluk: "Re: JPackage"

    Hi,

            Would it make sense to bind queries directly to an ObjEntity? As I
    understand it, ObjEntity "relationships" are nothing more than queries
    that are bound to the ObjEntity but have no qualifiers. It would be nice
    to be able to declare more complex queries (with qualifiers) be able to
    invoke them directly from the object. For example, I'd define a
    SelectQuery named "find" in the modeler and assign it the qualifier:

    "theme = $theme and provider = $provider"

            then from within my code I'd be able to invoke:

    myImage.find(myTheme, myProvider)

            and Cayenne will bind myTheme to $theme, myProvider to $provider. Note
    that the above query has an implicit condition "image = $image". If a
    query is bound to an Image ObjEntity Cayenne should be smart enough to
    bind $image to "this".

            What do you think?

    Gili

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



    This archive was generated by hypermail 2.0.0 : Mon Sep 05 2005 - 15:02:16 EDT