[Zope] AccessControl.Role.RoleManager &
nwingfield at che-llp.com
nwingfield at che-llp.com
Tue May 18 09:45:01 EDT 2004
I have experimented with the acquisition trick, and it seems to work well.
It also gives me a lot of flexibility if I want to create new attributes
(in addition to sql data) in the future. Thanks for the suggestion.
Dieter Maurer <dieter at handshake.de> wrote on 05/14/2004 03:24:57 PM:
> nwingfield at dixon-hughes.com wrote at 2004-5-14 11:49 -0400:
> > ...
> >I believe this is because Zope's base Record class has put the kabosh on
> >setting any of its attributes.
>
> Right!
>
> > So at this point I am wondering if I have
> >attempted the impossible.
>
> You will not be able to set attributes other than for
> fields defined by your SQL result. Those, you can change.
>
> You can easily add artificial fields to your SQL...
>
>
> Another work around may be to use acquition, i.e. use
> the SQL result as (acquisition) parent for your object.
> You can than define as many attributes as you like in
> your object.
> By acquisition magic, lookups are forwarded to your
> SQL result when your object cannot satisfy them.
>
>
> --
> Dieter
More information about the Zope
mailing list