On Wednesday, May 1, 2013 4:39:49 PM UTC-7, Anthony wrote:
>
>
> 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).
>

In this case it does not reference a set of DAL fields.
 

> 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. 
>

I did not know that - what form of *Layziness* are we talking about here? 
Will it generate a query to fill-up the target rows?
In any case, it is stil a reference to something the WOULD generate a Rows 
object - it is not a reference to an already-exising domain-object (which 
may then have references to othe domain-objects, etc. - all already within 
memory) object as is in ORMS
 

> The DAL also has list:-type fields, whose values are lists, including 
> lists of DAL.Reference objects in the case of list:reference fields.
>

That's interesting, but that is not exactl the same - list-fields need to 
be supported in the database, but in any case, it is not comparable to 
being linked to relation ally-stored primary-keys - which would be how it 
would be implemented in an ORM.

 Row objects can also include custom methods (i.e., "lazy" virtual fields) 
> as well as virtual fields, which can contain complex objects.
>

Relates to the comment I gave you a couple of minutes ago...
These are complementary-auxiliary features (with in the 
web2py-implementation case, have questionable real-world-utility) which 
while they do go beyond a "simple" value, they are still scalar, as they 
ultimately result in a reference to a scalar-value - not a reference to a 
sequence of objects.
 

>
> 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.


Reply via email to