I did something similar a couple years ago to figure out if it was possible 
to get at data in an Oracle database created by one of our network admin 
tools. The DB has hundreds of auto-generated tables, many are meta-data, so 
I used Sequel to generate my model templates, then dumped all the fields 
and keys and figured out which were the most used tables, based on the 
foreign-keys. 

>From there I added the needed associations by hand because mapping 
everything the app created automatically would have been wasted CPU time.

On Saturday, October 20, 2012 6:53:48 AM UTC-7, Sean Mackesey wrote:
>
> I'm looking for a script that will either:
>
> (1) generate Sequel model classes with the appropriate associations at 
> runtime by accessing a database and reading out the tables and foreign key 
> relations
> or 
> (2) generate the code for the above model classes automatically by either 
> reading a .sql schema file or accessing an existing database.
>
> I know how to write my own script to build the code from a schema file, 
> but this seems to me like it would useful to enough people that a tool 
> should already exist.  Anyone know how to do this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/_Gg8PN6eujsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to