[Modeling-users] Couple of questions...
Status: Abandoned
Brought to you by:
sbigaret
From: Aaron F. <afr...@em...> - 2004-04-20 16:46:58
|
(1) Is there a debug flag somewhere that dump all SQL queries to the console? (2) How are nested joins accomplished? For example, in the AuthorBooks schema, lets assume there is another table called publisher that has a 1-M relationship with books, like so (sorry about the formatting): ............................................................................ ............. .+-----------+.(0,1)..............(0,*).+-------+.(0,*)..............(0,1).+ -----------+. .|..Writer...|<-author----------books->>|.Book..|<<-books-------publisher->| .Publisher.|. .|-----------|.(nullify)......(cascade).|-------|..........................| -----------|. .|.lastName..|..........................|.title.|..........................| .bizName...|. .|.firstName.|..........................|.price.|..........................| .location..|. .|.age.......|.(0,1)....................+-------+..........................+ -----------+. .|.birthday..|<-pygmalion--+................................................ ............. .+-----------+.(nullify)...|................................................ ............. .....|....................|................................................. ............ ......+--------------------+................................................ ............. ............................................................................ ............. How would I get writers by publisher? More specifically, is there an elegant way to do a nested join in a single query, or do I just have to do a single writer-book join and then iterate over the resultset for the second join? Code examples would be great! Thanks for your time. -Aaron |