[Grok-dev] megrok.rdb feedback

Lennart Regebro regebro at gmail.com
Wed Sep 17 03:04:38 EDT 2008


On Tue, Sep 16, 2008 at 13:28, Martijn Faassen <faassen at startifact.com> wrote:
> I'm not sure I get it. All containers *are* models in Grok. It's just
> that rdb.Container nor rdb.QueryContainer are not rdb.Model, but more
> like grok.Model. A model is information mapped from a table. A container
> is a relationship mapped into an object.

Well, I couldn't get a container to work unless it also was a model.

> This leaves the starting point however - you need to be able to get to a
> model before you can get to containers. This is why there is also
> rdb.QueryContainer, which allows you to create a container that
> represents a query and is not backed by a relation in the database. This
> way you can get to your initial models. rdb.QueryContainer is also
> useful to build query-backed object structures that the ORM doesn't let
> you create. Both rdb.Container and rdb.QueryContainer make sure that
> URLs can be generated to the objects inside them.

OK, this is all very complicated, and not really explained in the
documentation, and seems to require quite a lot of knowledge before it
gets really understandable...

> I'd like to see you create a separate relational database example,
> independent from the first example. This keeps the concerns separate.

OK, maybe when I know what I'm doing. :)

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64


More information about the Grok-dev mailing list