On 21 Sty, 20:28, Jan Koprowski <[email protected]> wrote:
> On 21 Sty, 18:53, Ross Vandegrift <[email protected]> wrote:
>
> > It seems like you're putting a square peg in a round hole.
>
> I don't think so. My goal is just to made abstraction layer and this
> forces me to wrap Session. Thats all. Methods line def add() wher i
> use add and session method one by another doesn't give me transaction
> goodnes. Mayby
I want to wrap ... session in User class not wrap session for session
it self :) of course
> with User() as user:
> user.something = 'val'
> user.year = 2009
>
> will be good ?
with User() as user:
user.username = 'johny'
user.add()
and meta.Session.commit() will be call at end of with statement :P
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---