Craig,
I am copying this to the list, so that others can participate too. (Just
like subject says, this is about adding flattened relationships)
At 06:45 PM 10/16/2002 +1300, Craig Miskell wrote:
>My current thinking is that it's the ObjRelationship's responsibility to
>a) know it it is a flattened relationship, and
Yes. I think we should make it explicit by adding a corresponding boolean
method.
>b) handle adding/removing at the object level (creating intermediate
>objects etc).
>c) probably vetting at some stage that the intermediate objects only
>contain foreign keys (or that the other fields are optional)
>Then all we'd need is the relationship parsing code (path traversal I
>think) to recognize a flattened relationship and put in the extra join.
The idea was closer to (c): we wanted to make it cooler than EOF - there
will be no intermediate objects. The idea was to maintain m-to-m
relationships at the object level, and create/change rows in a join table
at the SQL level, avoiding creating a "join object". BTW, this was one of
the main reasons for the whole Db*/Obj* separation in the map. This is the
biggest piece to implement, since it affects query translators and the
whole object graph management. I guess we can start by doing read-only
support for such things, and then move to more complex updateable behavior.
It may also be simpler than I think as far as object graph concerned - I
guess we may treat "m-to-m" relationship as a simple to-many at the object
graph level. Of course the underlying wiring would still need to be aware
of the real structure.
Andrus
This archive was generated by hypermail 2.0.0 : Wed Oct 16 2002 - 21:12:54 EDT