"Identity" in expressions

From: Andrei Adamchik (aadamchi..obox.com)
Date: Mon Apr 30 2001 - 14:27:32 EDT


Since we are having this expressions discussion, I have some more notes.
This is about internal representation of relationships in queries.

Right now we have Expression.Identity class to pass any kind of object into
query. If this object is a column in a database that belongs to root entity
of the query, internally it is represented as ObjAttribute wrapped in
Identity. We still haven't decided how to represent an attribute of another
entity that has a relationship to root entity (ex.
"toDepartment.toCompany.toCEO.firstName)".

Since I need it now, I am taking initiative to build it. This will be some
class that inherits from ObjAttribute and internally has an ordered list of
relationships and a destination entity attribute. I will probably call it
"RelatedObjAttribute".

Its implementation will be similar (I think..) to WebObjects derived
attributes, but its use will probably be limited to expressions.

Real derived attributes (ObjEntity attributes that do not belong to this
ObjEntity's DbEntity) I think will be expressed in terms of
DbRelationships, not ObjRelationships, thus hiding unneeded details from
the object layer.

There is also a 3rd type of ObjAttributes (the ones Misha is working on) -
attributes that do not map to columns directly, but instead translate to
some SQL constructs like aggregate functions, etc.... But this is another story

Comments?

Andrei



This archive was generated by hypermail 2b30 : Sat Aug 04 2001 - 16:21:24 EDT