On Miércoles, 30 de Septiembre de 2009 09:33:35 Iñaki Baz Castillo escribió:
> On 25 sep, 17:10, "Sergio Cambra .:: entreCables S.L. ::."
>
> <[email protected]> wrote:
> > I have tried setting the primary key in the model with set_primary_key,
> > and I haven't need the primary_key option.
> > class Item < ActiveRecord::Base
> >   set_primary_key 'pduid'
> > end
> >
> > Really, I couldn't load items controller until I add set_primary_key
> > If I haven't understood your problem post your tables
>
> Yes, setting "set_primary_key 'pduid'" works, but it's a hack. For
> example, to get the number of rows now it performs this non cool
> query:
>
>   SELECT count(DISTINCT `items`.pduid)
>

You are right, I hadn't understood how to use :primary_key option, I have fixed 
it now.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to