Dynamic Data Maps

From: Jonathan Carlson (Jonathan.Carlso..atun.com)
Date: Tue Jan 03 2006 - 17:43:19 EST

  • Next message: Lothar Krenzien: "problem creating standalone DataContext"

    Hi all, I'm pleased about the new generic DataObject capability in
    Cayenne (although I have yet to try it).

    On a related note: Given all the attention given to
    Rails/ActiveRecords and "convention over configuration", I was wondering
    if anyone had created a utility to dynamically generate a DataMap at
    runtime from database metadata. Classes and properties could drop the
    underscores in the table and column names (if desired), and
    relationships could be generated from foreign key references.

    Has anyone done (or considered?) something like this? It would make it
    really nice companion to a scripting language like Groovy. Groovy SQL
    is a step above straight JDBC, but this would be even better. Instead
    of hand-coding all the SQL in Groovy, you could just point Cayenne to
    the DB, create a Cayenne query to find your row(s) and seamlessly
    navigate to all the related rows in the database. And with Cayenne
    you'd have all the performance enhacers at your fingertips: like
    prefetching, etc.

    I think that the only thing the utility might have trouble figuring out
    would be the unique ID generation information, but even that may be able
    to be inferred in some cases.

    - Jonathan

    ______________________________________________________________________
    This email and any files transmitted with it are confidential and
    intended solely for the use of the individual or entity to whom they
    are addressed. If you have received this email in error please notify
    the system manager.

    Katun Corporation -- www.katun.com
    _____________________________________________________________________



    This archive was generated by hypermail 2.0.0 : Tue Jan 03 2006 - 17:43:51 EST