Forum: Ruby on Rails Legacy database with varchar2 primary key?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5726e6410f03a6d52d1127fce76d02ad?d=identicon&s=25 William FISK (Guest)
on 2006-04-13 17:16
I rememeber seeing an article about how to cope with legacy databases
where the primary key is defined as VARCHAR2.  I only want read-access
to the data.

Does anyone have a link to such an article?  Or can give advice?
D2a5b7975f49e051c1de10f98ea81f63?d=identicon&s=25 Chang Sau Sheong (Guest)
on 2006-04-13 17:47
(Received via mailing list)
Try this wiki entry:

http://wiki.rubyonrails.com/rails/pages/HowToUseLe...

If you're reading data only it doesn't really matter if your primary key
is varchar2 or int. If you need to find any records from mutiple tables
I'd suggest you use find_by_sql.

William FISK wrote:
> I rememeber seeing an article about how to cope with legacy databases
> where the primary key is defined as VARCHAR2.  I only want read-access
> to the data.
>
> Does anyone have a link to such an article?  Or can give advice?
>
>


--
Sau Sheong

http://blog.saush.com
http://read.saush.com
http://jaccal.sourceforge.net
5726e6410f03a6d52d1127fce76d02ad?d=identicon&s=25 William FISK (Guest)
on 2006-04-13 19:10
Sau,

Thanks.

Yes find_by_sql works fine and seems to be the answer for me.

William
This topic is locked and can not be replied to.