On Mon, Apr 18, 2005 at 06:29:49PM +0200, Milos Prudek wrote:
> >from ZODB import PersistentList
> Interesting. I'll look at this idea. I never heard of this class.
> >You could then have NumberOfProperties become a ComputedAttribute
> >But AFAIK, ComputedAttributes don't support write methods.
> Um, are you saying that the solution would actually not work for my use 
> case?

If your use case is that a writable attribute is part of
your class' API, then yes I am saying that.

If your count is always updated by methods of the class anyway,
then you're fine.
> >So client code can't write "someArticle.NumberOfReaders += 1".
> >But then, you wouldn't be able to do that with a SQL-based
> >solution either.
> Why not? It's easy to write ZSQL method to update data. Probably we do 
> not understand each other.

Probably not. If you had an SQL solution, and some client code
said someArticle.NumberOfReaders += 1, how would you get that
assignment to fire off your SQL code?


Paul Winkler
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to