> The first thing to notice here, is that an ORM object-attribute can > contain NON-SCALAR values - meaning, a link to a list of other objects. > There is no feature in web2py that generates such an object. > > The second thing to notice here, is that the attributes of an ORM object > usually contain child-objects (plural) that represent fields from a > different table than the parent-object. Again, there is no feature in > web2py that can generate such an object. A JOIN operation may return row > objects, each of which may contain sub-attributes that hold A SINGLE > field-value > from a foreign-table, but it is a *scalar-value* - NOT another * > domain-entity-object* (with it's own attributes, etc.), NOR a SEQUENCE of > *domain-entity objects* >
> ... > The crucial thing to notice here is that an ORM object-attribute can > contain NON-SCALAR values - meaning, a link to a list of other objects, > which themselves may contain links to other objects/sequences-of-objects, > etc. > Although ORM's may do that, such a feature is not unique to the ORM pattern. In the web2py DAL, for example, in a Row object with a reference to another table, the reference field is actually a DAL.Reference object, not a scalar value (it includes the scalar value but also allows access to related records in the referenced table). Similarly, a Row object from a table that is referenced by another table includes an attribute that is a DAL.LazySet object (also not a scalar), which allows access to the records in the referencing table that reference the current Row object. The DAL also has list:-type fields, whose values are lists, including lists of DAL.Reference objects in the case of list:reference fields. Row objects can also include methods (i.e., "lazy" virtual fields). Anthony -- --- 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/groups/opt_out.