Brian Sutherland wrote:
I'll note that there is a difference between where things are published
(IAbsoluteURL) and where you should go to find their canonical

One problem I've found with using IAbsoluteURL and location proxies is
getting the object directly from the database. In this situation you
don't have an LocationProxy and IAbsoluteURL doesn't work.

It's pretty nasty when IAbsoluteURL sometimes works and sometimes
doesn't for what essentially is the same object.

Agreed, we should ideally always get our objects from the db already properly wrapped in a location proxy (or providing ILocation directly). I think we can do this with containers based on relations; those containers are under our control after all.

Is a direct one on one relation possible in SQLAlchemy? I.e. an object foo that has an attribute 'bar' that is another ORM-ed object. If so we also need to take care of that case somehow.

This is the "it should work like ZODB-backed objects" pattern I've been trying to follow as a design guideline. Since for contained objects I can always get the URL, it should work that way for RDB-based contained objects too.



Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to