[sqlalchemy] Automatically populate a field in the association table when using attribute_mapped_collection association_proxy

2012-04-11 Thread Franck
. Is it possible ? I documented the expected behaviour in the code snippet (bottom of the code). Thanks a lot ! Franck PS my snippet is based on Michael's advice written last year - thanks for that ! http://groups.google.com/group/sqlalchemy/browse_thread/thread/e476915147804941/c94ee256eccc0bc1

Re: [sqlalchemy] Automatically populate a field in the association table when using attribute_mapped_collection association_proxy

2012-04-11 Thread Franck
is modified. Am I missing something here ? Thanks ! Franck *** Calling the PollVote constructor *** 2012-04-11 18:15:59,668 INSERT INTO POLL_VOTES (poll_id, user_id, vote_dt) VALUES (?, ?, ?) 2012-04-11 18:15:59,668 (1, 1, '2012-04-11 18:15:59.666212') 2012-04-11 18:15:59,669 INSERT

Re: [sqlalchemy] Automatically populate a field in the association table when using attribute_mapped_collection association_proxy

2012-04-11 Thread Franck
, the validator fires for *every* modified item - do you think it could be possible in the future to have a validator which executes only once per collection modification, even if 50 rows for instance are appended at the same time ? Thanks again for your support ! Franck Le mercredi 11 avril 2012 18:44:24

[sqlalchemy] Re: Most efficient way to synchronize a set ?

2012-04-03 Thread Franck
, Franck wrote: Hi, To store the preferences of my users I'm storing one row per user per preference : if the possible choices are A,B,C,D I'm storing B,C,D for instance at the user level in the database. Suppose the user changes its preferences and picks A,C for instance. I'm

[sqlalchemy] Most efficient way to synchronize a set ?

2012-04-02 Thread Franck
I'm going to need to persist A I was thinking to do this manually with the builtin set operations (http://docs.python.org/library/stdtypes.html#set), typically difference, to manually add/remove these in the session but is there a way SQLAlchemy can do the work for me automatically ? Thanks ! Franck

[sqlalchemy] Re: Automatically retrieving the row index

2011-04-08 Thread Franck
Thanks Mike ! It was exactly the kind of tool I was looking for. Cheers, Franck On Apr 7, 1:20 pm, Mike Conley mconl...@gmail.com wrote: Take a look at using ordering_list for the collection class on your relation. You add a position in season and SQLAlchemy will maintain the value. http

[sqlalchemy] Joined Table Inheritance question

2011-03-10 Thread Franck
or managers. Ideally some exception should be thrown if I try to add an Employee object to my session. Of course, I'd still like to be able to persist Engineers and Managers with the right type. Is there a way to achieve that ? Thanks a lot ! Franck -- You received this message because you are subscribed

[sqlalchemy] Re: Joined Table Inheritance question

2011-03-10 Thread Franck
I'm trying to reply myself... maybe I could set *polymorphic_identity=None *at the Employee level, and define the DB field EMPLOYEE.TYPE field as not nullable... Would that work ? Is there a better way ? Thanks ! Franck On Thu, Mar 10, 2011 at 2:00 PM, Franck franck.pe...@gmail.com wrote: Hi

[sqlalchemy] One commit per request

2011-01-24 Thread Franck
? Thanks a lot ! Franck -- 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

Re: [sqlalchemy] Implementing a specific commit/refresh strategy for one table only

2011-01-14 Thread Franck
Thanks Michael. I'll also study carefully the other thread (can expire_on_commit be made...) it has interesting insights ! Franck On Thu, Jan 13, 2011 at 4:26 PM, Michael Bayer mike...@zzzcomputing.comwrote: You'd implement the expire yourself using SessionExtension.after_commit

[sqlalchemy] Implementing a specific commit/refresh strategy for one table only

2011-01-13 Thread Franck
! Franck -- 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

[sqlalchemy] Re: Relationships : how to properly filter children ?

2011-01-12 Thread Franck
makes sense (subscriptions.values() is not ordered). How could I force the order_by nevertheless ? Thanks a lot ! Franck On Mon, Jan 10, 2011 at 7:05 PM, Franck franck.pe...@gmail.com wrote: Dear all, I'm developing a website aimed at handling tournaments' results and subscriptions. One

Re: [sqlalchemy] Re: Relationships : how to properly filter children ?

2011-01-12 Thread Franck
Thank you very much ! I'm going to study the different options I have here. On Wed, Jan 12, 2011 at 3:01 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 12, 2011, at 7:47 AM, Franck wrote: Dear all, I've been trying to answer my own question and use

[sqlalchemy] Relationships : how to properly filter children ?

2011-01-10 Thread Franck
else : self.subscriptions.append(Subscription(user, status)) # Commit / rollback logic What do you think ? Since self.subscriptions is already bound, how should I properly filter it by user ? Thanks very much for your help ! Franck -- You received this message because

RE: [sqlalchemy] Questions about sessions connections

2010-12-22 Thread Franck _
Thank you very much Michael ! It makes perfectly sense. From: mike...@zzzcomputing.com Subject: Re: [sqlalchemy] Questions about sessions connections Date: Wed, 22 Dec 2010 11:07:22 -0500 To: sqlalchemy@googlegroups.com On Dec 21, 2010, at 5:03 AM, Franck Vonbau wrote:Dear all, I'm

[sqlalchemy] Questions about sessions connections

2010-12-21 Thread Franck Vonbau
help ! Franck -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr

[sqlalchemy] Sqlalchemy without shell access

2010-06-26 Thread Franck
Hello, I have access to a free hosting service with python but they only provide ftp access, so here is my question: Is it possible to use sqlalchemy by simply uploading it? Thanks, Franck. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post