Sure. Cayenne DbLoader can do that. Just make sure you call
"setGenericClassName(CayenneDataObject.class.getName())", before
running it.
Andrus
On Jan 3, 2006, at 5:43 PM, Jonathan Carlson wrote:
> 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 : Wed Jan 04 2006 - 08:08:39 EST