On Fri, 13 Apr 2007 15:09:29 -0400, Hermann Himmelbauer <[EMAIL PROTECTED]>
Am Freitag, 13. April 2007 20:27 schrieb Kapil Thangavelu:
i would suggest some alternatives approaches to consider first.
potentially this would be easier going the other way around with zs2sa,
and generating the mapper from there, you don't need to annotations as
well since the zope schemas contain the relevant ui metadata, and the
schema is the canonical definition of the rdb/sa schema. bonus is you
multidb support for the schema, as an example of doing things this way,
the transmute funcction has the options of specifying base interfaes, so
you also have the option at the risk of ordering dependencies of
the iface class thats a base arg to the transmute function with the
of the transmute function, presumably though if this being done in the
same module (interfaces.py) then its not an issue though.
Interesting approach, however, I doubt this is going to work when one
access an existing relational database - like in my case. After all one
once again redundant definitions.
Therefore in cases where the database is designed together with the Zope3
application, the transmute function could be an interesting approach,
cases where the DDL-statements already exist, the generation of schemas
of the table definitions seem to be the better way.
Moreover I'm also curious if advanced table definitions such as
checks and the like can be generated from Zope schemas.
ore.alchemist supports both notions, as both options are wanted for
different use cases, ie both database as canonical schema representation
and interfaces as canonical with automatic generation of the other form.
it does support basic constraint inferment and generation from either
canonical source. the solution above was presented here in the context of
a particular deployment.
Zope3-users mailing list