Dnia 2009-11-02, pon o godzinie 16:07 -0500, Michael Bayer pisze:

> Providing AttributeExtension hooks to end users who can then write custom
> code without any attention to object/session state is never guaranteed to
> work completely. 

Um, that's not the case. We develop the extensions ourselves, it looks
somewhat like this:

SomeClass.someProp = tefobjects.properties.Integer(immutable = True,
dependable = True)

These kwargs cause appropiate extensions (already defined in tefobjects
package) to be appended. People utilizing our API will in general use
extensions on this level only.

> Why isn't it an option, when granting users access to AttributeExtension,
> that you flush() their session first ?  you would then disable autoflush
> temporarily at the Session level (just set the "autoflush" attribute on
> it).

Do you mean adding another layer of descriptors which would flush()
before setting an sqlalchemy property? Well it is an option, but it
would get things even more complicated and ugly. It would basically be a
bloated workaround. The patch I have suggested doesn't seem to be able
to break anything, it seems more natural (at least for me) to call
modify_event() in these places.

I have attached a file showing the problem to the ticket 1601.

regards,
Filip Zyzniewski


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

Reply via email to