Michael Bayer wrote:
>
> Hmmm, do you mean joining relations against a subrelation that uses  
> an aggregate like MAX ?  i'd like to see what you have in mind for this.
Well, I think I've not explained it correctly.

It looks quite like you're saying, but I want that aggregations
to be stored (cached?) in the table.

Suppose you have, a table of articles and comments on them.
I want to have article.last_comment and article.number_of_comments
to be stored in columns and to be updated when I'm saving Comment
object (which e.g. has a foreign key to article).
And I really want that to be atomic updates (update set cnt=cnt+1)
instead of updating counter on Article instance and saving it.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to