Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
self referential belongs_to
Aryk Grosz
6/26/2008 3:40:00 AM
I noticed that eager loading a belongs to association that points back
to an item of the same class is causing AR to lock up.
For example
class Layout < ActiveRecord::Base
belongs_to :flipped_layout, :class_name => "Layout", :foreign_key =>
"flipped_layout_id"
end
So when I do, Layout.find(:all, :include => :flipped_layout), it locks
up.
Am I doing something wrong or this a known bug with Rails?
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
self referential belongs_to
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password