NM.  I've realised that SO doesn't automatically support add and remove
on MultipleJoins.  The only way to add and remove items from a
MultipleJoin is to go into the item in question, and adjust the
corresponding ForeignKey.

Stuart


On Thu, 2006-11-09 at 21:17 +1000, Stuart Clarke wrote:
> Hey,
> 
> I have the following classes:
> 
> class Producer(SQLObject):
>       name = StringCol()
>       producer_category = ForeignKey('Producer_category')
> 
> class Producer_category(SQLObject):
>       name = StringCol()
>       producers = MultipleJoin('Producer)
> 
> Say I do:
> 
> producer_category = Producer_category.get(1)
> producer = Producer.get(1)
> 
> I want to be able to do:
> 
> producer_category.addProducer(producer)
> 
> But I can't.  RelatedJoins, however, work fine with the addFoo and
> removeFoo method generation.
> 
> Is there some trick that I'm not employing, or should things work as I
> expect them to?
> 
> Thanks,
> 
> Stuart
> 
> 
> > 
> 


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to