multicolumn? Re: [jira] Commented: (CAY-400) Support for user properties of DataMap objects.

From: Tore Halset (halse..vv.ntnu.no)
Date: Wed Apr 15 2009 - 07:28:29 EDT

  • Next message: Mike Kienenberger: "Re: deprecate cdeploy?"

    Hello.

    I just want to bring another example on the table. Hope I am not
    messing things up too much.

    What about multi-column information? I want to store information about
    db indexes that have a name, can span multiple columns and be of
    different types. I know this is probably out of scope for cayenne as a
    ORM, but very useful for us since we already store all other schema-
    related information in the model.

    If we go with a generic property map with string values, such
    information could be encoded into the String, but it will not be very
    pretty..

    dbEntity.setProperty("DB-INDEX", "name: myindex, type: unique,
    columns: col1, col2");

    Regards,
      - Tore.

    On Apr 14, 2009, at 10:43 , Andrus Adamchik wrote:

    > Yes, this is a question of classification of "comment" property -
    > whether we think it is "generic" or not...
    >
    > I don't have strong feelings either ways. My criteria for a generic
    > property as "being irrelevant to Cayenne runtime" may not apply to
    > comments if you use comments in DB schema generation. (BTW, is there
    > a plan to do that?).
    >
    > So I am +0 on making comment an ivar. But please (re)open a separate
    > Jira for that.
    >
    > Andrus
    >
    >
    >
    >
    > On Apr 14, 2009, at 11:30 AM, Andrey Razumovsky wrote:
    >
    >> I'm afraid I don't actually catch the point. This sounds like two
    >> separate
    >> tasks.
    >> Comments that are (re) engineered to SQL comments cannot be
    >> generic, because
    >> as far as I know, SQL specifies only one string per column, table
    >> etc.
    >> Generic properties are more flexible, but they cannot be saved in
    >> DB. And I
    >> don't like the idea of having generic property map this one
    >> "specific"
    >> comment key, because it makes the design blurry. So possibly we
    >> could open
    >> both tasks (?)
    >>
    >> Andrey
    >>
    >> 2009/4/14 Aristedes Maniatis <ar..sh.com.au>
    >>
    >>>
    >>> On 14/04/2009, at 6:13 PM, Andrus Adamchik wrote:
    >>>
    >>> I have no problem with the reduced scope. But can we still make it a
    >>>> generic property map initialized lazily and attached to
    >>>> DbAtrtribute or
    >>>> DbEntity, with comments being just one of the possible fields in
    >>>> it? I.e.
    >>>> the idea to group any properties not relevant to Cayenne runtime
    >>>> functioning
    >>>> in an untyped Map<String, Object>, instead of declaring them as
    >>>> ivars
    >>>>
    >>>
    >>> Map<String, String> might be easier unless we want to go to the
    >>> trouble of
    >>> typing these objects in both Cayenne modeler with another popup
    >>> option and
    >>> also in the XML. Mostly the user can cast them into some other
    >>> data type if
    >>> needed.
    >>>
    >>> Ari
    >>>
    >>>
    >>>
    >>> -------------------------->
    >>> ish
    >>> http://www.ish.com.au
    >>> Level 1, 30 Wilson Street Newtown 2042 Australia
    >>> phone +61 2 9550 5001 fax +61 2 9550 4001
    >>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
    >>>
    >>>
    >>>
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Apr 15 2009 - 07:30:10 EDT