Re: Client PK access

From: Michael Gentry (blacknex..mail.com)
Date: Sun Apr 27 2008 - 11:50:12 EDT

  • Next message: Kevin Menard: "Re: Client PK access"

    Hi Kevin,

    I'm just curious since I haven't been following Tapestry much lately
    (I'm in WebObjects land currently) if you are making a data squeezer
    (or whatever they are calling it in T5) for Cayenne? If so, is it
    just going to stuff primary keys into the HTML as hidden fields or be
    something more elaborate? The environments I've worked in tend to
    need data security and exposing the primary keys in the HTML would be
    a definite no-no. You never want to give the client/end-user a chance
    to hack the primary key values to try gain backdoor access to the
    data.

    Thanks!

    /dev/mrg

    On Sun, Apr 27, 2008 at 10:08 AM, Kevin Menard <kmenar..ervprise.com> wrote:
    > As part of the fix for CAY-574, we added a getPrimaryKeyNames() :
    > Collection<String> method to ObjEntity. This did the trick and allowed
    > DataObjectUtils to work. Unfortunately, it doesn't expose the PK type
    > information.
    >
    > As some of you likely know, I'm working on Tapestry5-Cayenne integration
    > module with Robert Zeigler. I'm trying to ensure the module works just as
    > well for an ROP client as it does for traditional Cayenne server apps. One
    > of the things we need to be able to handle is the coercion of keys to and
    > from String values. This implies knowledge of the key class type, which is
    > currently unavailable in the client.
    >
    > I'm soliciting ideas on how to improve this. Off the top of my head, I'm
    > thinking something like the following:
    >
    > // Simple key-> value lookup.
    > String getPkClassName(String pkName)
    >
    > // Modification of existing method to allow PK lookups.
    > ObjAttribute getAttribute(String name, boolean includePks)
    >
    > // Rather than just have getPrimaryKeyNames(), return a mapping
    > // of the key name and its Java class.
    > Map<String, String> getPrimaryKeys()
    >
    > If possible, this is something I'd like to see squeezed in for 3.0M4,
    > because I'd really like that module to not have to rely on 3.0-SNAPSHOT.
    >
    > Thanks,
    > Kevin
    >
    >



    This archive was generated by hypermail 2.0.0 : Sun Apr 27 2008 - 11:50:46 EDT