here this trouble... i have a "forest" of bitemporal/versioned objects that are all linked via m2m relations, and all they "own" parameters, via m2m again.
any idea how to map something like this then without going down to tables: (pseudocode) Doc.ver == ver and ( Doc.dbid == Doc2Place.doc and Doc2Place.place == ParamOwnership._place or Doc.dbid == Doc2Position.doc and ( Doc2Position.poz == ParamOwnership._poz or Doc2Position.poz == Position2Dept.poz and ( Position2Dept.dept == ParamOwnership._dept or Position2Dept.dept == Dept2Dept.child and Dept2Dept.parent == ParamOwnership._dept ) ) ) and ParamOwnership.value == ParamValue.db_id where: Doc, Place, Position, Dept all have ParamValues (via m2m ParamValueOwnership) Doc has Place and Position (via m2m Doc2Place, Doc2Position) Postion has Dept (via m2m Pos2Dept) Dept has parent Dept (via m2m Dept2Dept) the last one is recursive, but i'll handle it somehow, adjacent sets or unroll several levels. the good news is that i'm generating the above on level of tables/ plain column expressions (unrolling); the bad is that i may need all the intermediate objects as well... will add_entity( all them Doc Place Position Dept Ownership) do it? another trouble is the ParamOwnership m2m, it has different links for diff. types of owners (mutualy exclusive), because otherwise i hit multiple inheritance. any idea about multiple inheritance? i.e. it looks like creating same object via different polymorhic hierarchies.. ta svilen On Tuesday 10 June 2008 16:39:57 you wrote: > g'day. > i stepped on strange behavour (0.4 latest): > class AB is an assoc proxy, .myb pointing to B; > the clause > AB.myb == B.dbid > fails with NotImplementedError: > File "sqlalchemy/sql/expression.py", line 1191, in __eq__ > return self.operate(operators.eq, other) > File "sqlalchemy/sql/expression.py", line 1315, in operate > return o[0](self, op, other[0], *o[1:], **kwargs) > File "sqlalchemy/sql/expression.py", line 1277, in __compare > obj = self._check_literal(obj) > File "sqlalchemy/sql/expression.py", line 1421, in _check_literal > return other.expression_element() > File "sqlalchemy/orm/attributes.py", line 53, in > expression_element return self.comparator.expression_element() > File "sqlalchemy/orm/interfaces.py", line 432, in > expression_element return self.clause_element() > File "sqlalchemy/sql/expression.py", line 1170, in clause_element > raise NotImplementedError() > NotImplementedError > > these work (not the .property): > AB.myb.property == B.dbid > AB.myb == 3 > > AB.myb.property.direction is MANYTOONE > seems i'm missing something?? > any idea or prepare a test case? > svilen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---