[Nitro] og, select
jfwittmann
neokolor at gmx.de
Wed Oct 12 18:44:16 EDT 2005
hello,
I want extend an og mixin.
this is what i have and found out about og. I get my entity objects.
But how can I get the "level" value in my entity objects ? this
attribute should not exist in the storage table. it's like a virtual
attribute
base.module_eval <<-EOE, __FILE__, __LINE__
....
class << self
def all(options = {})
table = Og.manager.store.table(#{base})
sql = %{
SELECT o1.*, COUNT(*) AS level
FROM
\#{table} AS o1,
GROUP BY o1.#{left};
}
return self.select(sql)
end
end
thanks,
Felix
More information about the Nitro-general
mailing list