more than 1 level of belongsTo

28 views
Skip to first unread message

rahajiyev

unread,
Jun 8, 2012, 8:57:56 AM6/8/12
to Django users
Hi, I have a model Foo belongsTo Bar, which in turn belongsTo Xyzzy.
When I do $this->Foo->find('all');

sql dump shows that the SQL join is performed only for Foo->Bar, but
Xyzzy is never mentioned.
I tried all sorts of 'recursive' => 1 it didn't matter.
Please help me.

CakePHP 1.3.15

rahajiyev

unread,
Jun 8, 2012, 8:56:40 AM6/8/12
to Django users

bruno desthuilliers

unread,
Jun 8, 2012, 11:17:18 AM6/8/12
to Django users
What about posting your CakePHP questions to a CakePHP related
group ?

rihad

unread,
Jun 8, 2012, 12:13:12 PM6/8/12
to Django users


On Jun 8, 8:17 pm, bruno desthuilliers <bruno.desthuilli...@gmail.com>
wrote:
> What about posting your CakePHP questions to a CakePHP related
> group ?
>
Dammit, sorry for that. Wrong topic.

David Lam

unread,
Jun 8, 2012, 12:53:26 PM6/8/12
to django...@googlegroups.com
I'd try debugging it by putting a 'import pdb; pdb.set_trace()' there in your php file.  Or maybe installing django-debug-toolbar-- I think theres a slight chance it *might* work 


 
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


rahajiyev

unread,
Jun 12, 2012, 3:05:16 AM6/12/12
to Django users
You can keep laughing all you want, but I at least could get CakePHP
to work with an existing Oracle database lacking primary keys for a
backend app involving role permissions, forms, pagination and other
usual web stuff, as opposed to designing a new app and database from
scratch. I worked around the lack of primary keys using Oracle's ROWID
and Cake's $virtualFields. From then on $rowid was as good as a usual
field for the purposes of data retrieval and updating.
Then I thought I'd rewrite this simple app in Django while learning it
at the same time. But Django doesn't really allow me to use such
virtual fields easily. Ian gave me a solution to my problem here:
http://groups.google.com/group/django-users/browse_thread/thread/77f8353da1bcca53

but it doesn't seem to be what I'm looking for. Maybe someone here has
an idea?

Ian

unread,
Jun 12, 2012, 12:10:00 PM6/12/12
to django...@googlegroups.com

Sorry, I saw your response in that thread but got distracted and forgot to post a followup. I've done so now.
Reply all
Reply to author
Forward
0 new messages