Hi Anthony, that's exactly what I need, because (among other things)
when the parent key is part of the child primary key I can do something
like child.parent_id, and it works the same with a relationship of depth
n, for example in the relation author-book-page-sentence-word, I can ask
what author wrote a word just saying word.author_id without need to join
word with sentence with page with book to get the author id.
Greetings.
El 05/07/16 a las 16:58, Anthony escribió:
On Tuesday, July 5, 2016 at 2:10:19 PM UTC-4, Carlos Cesar Caballero
wrote:
Hi Antony, tough day with me no?
You not need a join to get the id of any of the related tables,
but if you need only the top-table data, you only need one join,
not n (you can look the diagrams)
Not sure I follow. As I understand it, an identifying relationship is
one where the foreign key from the child to the parent is also part of
the primary key of the child. In the DAL, you still have the foreign
key, but the DAL also includes a unique primary key (i.e., a
"surrogate"), so there is no need for the foreign key to serve as part
of the primary key. The structure of the table and logic of the
relationship remains the same in either case, though, no?
It would help to clarify if you could specify the schema of a set of
tables and explain what you can do with your proposed schema that you
cannot easily do via the DAL.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google
Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to web2py+unsubscr...@googlegroups.com
<mailto:web2py+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
Este mensaje le ha llegado mediante el servicio de correo electronico que
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
Nacional de Salud. La persona que envia este correo asume el compromiso de usar
el servicio a tales fines y cumplir con las regulaciones establecidas
Infomed: http://www.sld.cu/
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.