[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Relational Database Connectivity

webmaster@zope.org webmaster@zope.org
Sat, 28 Sep 2002 08:28:45 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/RelationalDatabases.stx#3-102


      This 'Employee' class shows how methods can use other Zope
      objects to weave together relational data to make it seem like a
      collection of objects. The 'manager' method calls two Z SQL
      Methods, one to figure out the emp_id of the employee's manager,
      and another to return a new Result object representing the
      manager. You can now treat employee objects as though they have
      simple references to their manager objects. For example you
      could add something like this to the *viewEmployee* DTML Method::

        <dtml-if manager>
          <dtml-with manager>
            <p> My manager is <dtml-var first> <dtml-var last>.</p>

        % Anonymous User - Sep. 28, 2002 8:28 am:
         <p> My manager is <dtml-var fullName>.</p>