[Nitro] Problems using Og
George Moschovitis
george.moschovitis at gmail.com
Tue Aug 2 02:11:25 EDT 2005
I 'll look at this along with your earlier post, later today.
-g.
On 8/2/05, John Lloyd-Jones <john.lloydjones at gmail.com> wrote:
> I have another error that appears to rooted in the same problem as I
> previously reported.
>
> As before I have Party, Person and PersonalCustomer. where Party
> :has_many, Address
>
> I have saved a PersonalCustomer and now try to add multiple addresses.
> I get an error when trying to retrieve an address by name.
>
> Here's the code that fails:
>
> def test_multiple_addresses
> p2 = CRM::PersonalCustomer.one :condition => 'customer_number=1002'
> p2.add_address( @a_primary )
> p2.add_address( @a_maling )
> p2.save
>
> p3 = CRM::PersonalCustomer.one :condition => 'customer_number=1002'
> a1 = p3.addresses['primary']
> end
>
> Here's the message I get:
>
> DEBUG: SELECT * FROM ogcrm_personalcustomer WHERE customer_number=1002
> DEBUG: SELECT * FROM ogcrm_address WHERE personal_customer_oid = 1
> /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in
> `check': no suchcolumn: personal_customer_oid (SQLite3::SQLException)
>
> John
>
>
> On 7/31/05, George Moschovitis <george.moschovitis at gmail.com> wrote:
> > Ok, I 'll have a look at this!
> >
> > Thanks for reporting!
> > -g.
> >
> > On 8/1/05, John Lloyd-Jones <john.lloydjones at gmail.com> wrote:
> > > Ysabel
> > >
> > > > That said, I suspect you could work around it by doing this on Address:
> > > >
> > > > def personal_customer_oid
> > > > self.party_oid
> > > > end
> > > > def personal_customer_oid=(oid)
> > > > self.party_oid = oid
> > > > end
> > > >
> > > > (Which is a gross hack, but it'd be interesting at least to know if it
> > > > works.)
> > > >
> > > Yes, that did work. Not pretty, but it moves me forwards.
> > > Thanks,
> > > John
> > >
> > > _______________________________________________
> > > Nitro-general mailing list
> > > Nitro-general at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/nitro-general
> > >
> >
> >
> > --
> > http://www.nitrohq.com
> >
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
--
http://www.nitrohq.com
More information about the Nitro-general
mailing list