Trunk and single table inheritance

My colleague Josh was having a hard time getting this email though
either the web or email interfaces, so I’m forwarding it along.

Hi all,

I’m getting discrepancies between stable and trunk when doing a
search involving single-table inheritance and I can’t locate the
problem.

I’m running Rails 2.0.2 with the following (simplified) schema:

class Model < ActiveRecord::Base
acts_as_ferret
end

class ModelSubClass < Model
end

Under AAF/tags/stable, Model.find_by_contents(’*’) returns all Models
and all ModelSubClasses. Under AAF/trunk, the same query only returns
Models. Has AAF changed its STI model?

The API also indicates that find_by_contents no longer takes
the :models param, and including it does not change the output in
either case – is there a new way to search across multiple classes?
If I could manually force the query to look at Model and all
subclasses, I could live with the workaround.

Thanks,
Josh

Hi,

there has happened a lot in aaf trunk since the 0.4.3 was released, so
this might well be a bug I introduced recently.

I’ll look into this. Could you please file a ticket on trac?

Cheers,
Jens

On Fri, Apr 11, 2008 at 04:09:04PM -0400, John B. wrote:

The API also indicates that find_by_contents no longer takes
the :models param, and including it does not change the output in
either case – is there a new way to search across multiple classes?
If I could manually force the query to look at Model and all
subclasses, I could live with the workaround.

Thanks,
Josh


Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk


Jens Krämer
Finkenlust 14, 06449 Aschersleben, Germany
VAT Id DE251962952
http://www.jkraemer.net/ - Blog
http://www.omdb.org/ - The new free film database