ORM's that support legacy Sql Server Databases

Hello,

Are there any any ORM frameworks out there that support legacy Sql
Server Databases?

Here are some requirements:
* Supports Sql Server
* Support multi-column keys
* Use existing tables as is
* Be easy to set up and use in isolation

ActiveRecord will not work b/c it doesn't support multi-column keys.
ObjectGraph is a possibility but I am having issues getting it to work.

Are there any other good frameworks out there?

Thank you,
Brian Takita

Is there a DBI driver for SQL Server that works? If so, Kansas should work.
That would be dbd_ado, right? I've never tried it, but if it is a decent DBI
driver, it should work fine. I'll try to install it tomorrow and see.

Kirk Haines

···

On Friday 19 August 2005 5:01 pm, Brian Takita wrote:

Hello,

Are there any any ORM frameworks out there that support legacy Sql
Server Databases?

Here are some requirements:
* Supports Sql Server
* Support multi-column keys
* Use existing tables as is
* Be easy to set up and use in isolation

Try dbd_odbc. It works with unixODBC too, so you get the added benefit
of not being bound to Windows.

Mohit.

···

On 8/19/05, Kirk Haines <khaines@enigo.com> wrote:

On Friday 19 August 2005 5:01 pm, Brian Takita wrote:
> Hello,
>
> Are there any any ORM frameworks out there that support legacy Sql
> Server Databases?
>
> Here are some requirements:
> * Supports Sql Server
> * Support multi-column keys
> * Use existing tables as is
> * Be easy to set up and use in isolation

Is there a DBI driver for SQL Server that works? If so, Kansas should work.
That would be dbd_ado, right? I've never tried it, but if it is a decent DBI
driver, it should work fine. I'll try to install it tomorrow and see.

Kirk Haines

--
Mohit Muthanna [mohit (at) muthanna (uhuh) com]
"There are 10 types of people. Those who understand binary, and those
who don't."

Unfortunately, DBI's ADO driver does not support the columns method.
This causes a failure in Kansas when trying to select columns.

C:\ruby\lib\ruby\site_ruby/kansas/Table.rb:49:in `key'
        result = self.class.primaries.collect{|f| @row[f.to_s]}
C:\ruby\lib\ruby\site_ruby/kansas/Database.rb:481:in `add_object'
        if cachedObj = has_object?(object.class, object.key)
C:\ruby\lib\ruby\site_ruby/kansas/Database.rb:232:in `select'
          results << add_object(tables[0].new.load(row.to_h, self,
read_only))
C:\ruby\lib\ruby\site_ruby/kansas/Database.rb:230:in `fetch'
        rawResults = @dbh.select_all(sql) do |row|
C:\ruby\lib\ruby\site_ruby\1.8/dbi/dbi.rb:846:in `each'
        fetch(&p)
C:\ruby\lib\ruby\site_ruby\1.8/dbi/dbi.rb:673:in `select_all'
            sth.each(&p)
C:\ruby\lib\ruby\site_ruby\1.8/dbi/dbi.rb:671:in `execute'
        execute(stmt, *bindvars) do |sth|
C:\ruby\lib\ruby\site_ruby\1.8/dbi/dbi.rb:671:in `select_all'
        execute(stmt, *bindvars) do |sth|
C:\ruby\lib\ruby\site_ruby/kansas/Database.rb:230:in `select'
        rawResults = @dbh.select_all(sql) do |row|

The ADO Connection object does have a OpenSchema method to collect the
columns. Perhaps this could be used to add the columns method in ADO.rb.

Hmmm. It looks like the dbd_ado driver is about as barebones as is possible.
The odbc driver has a little more meat to it and might be a better candidate,
though I think it needs some attention, too. Either that or the dbd_ado
driver needs to be filled out a little more.

Kirk Haines

···

On Saturday 20 August 2005 1:31 pm, Brian Takita wrote:

Unfortunately, DBI's ADO driver does not support the columns method.
This causes a failure in Kansas when trying to select columns.

That, or just have another method that hits INFORMATION_SCHEMA.COLUMNS
for a given table_name into a recordset...

···

On 8/20/05, Brian Takita <brian.takita@gmail.com> wrote:

The ADO Connection object does have a OpenSchema method to collect the
columns. Perhaps this could be used to add the columns method in ADO.rb.