From: Sean Leach <kickdaddy@gm...> - 2005-02-08 15:27:52
Ok - I need some help here with debugging a problem.
I defined this class:
group = ForeignKey('Group')
I also have
objects = MultipleJoin('Object')
BUT - when I try and print
$object.group in my cheetah template, it says group is not found in
$object, what am I doing wrong? I don't even know the best way to
troubleshoot this. I have ?debug=1 passed to my connection, so I can
see the SQL, but it only includes the select from object.
Thanks for any help. This is like SQLObject 101 and I feel embarrased
I can't get it to work.
From: Ian J Cottee <icottee@bl...> - 2005-02-08 15:46:06
I had this same problem the other day and somebody here helped me out
On 9 Feb 2005, at 00:27, Sean Leach wrote:
> Ok - I need some help here with debugging a problem.
> I defined this class:
> class Object(SQLObject):
> # fields...
> group = ForeignKey('Group')
> I also have
> class Group(SQLObject):
> # fields
> objects = MultipleJoin('Object')
change this to
objects= MultipleJoin('Object', joinColumn='object_id')
or with whatever your joinColumn is. Now you can see all the objects
that belong to your group in objects. The docs seem to say that should
be done automatically but I haven't been able to get it to work so far.
Must log a bug report I think
Ian J Cottee
Blue Fountain Systems Ltd