Re: [sqlalchemy] Forcing relationships to load before after_commit

2018-10-11 Thread Benjamin Bertrand
Oct 10, 2018 at 4:40 PM Benjamin Bertrand > wrote: > > > > Hi, > > > > I'm trying to index some data from my postgres database to > elasticsearch. I do something similar to what is described in this blog > post: > https://blog.miguelgrinberg.com/post/

[sqlalchemy] Forcing relationships to load before after_commit

2018-10-10 Thread Benjamin Bertrand
Hi, I'm trying to index some data from my postgres database to elasticsearch. I do something similar to what is described in this blog post: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-full-text-search I store the new or modified objects in the before_flush event and

[sqlalchemy] possible bug when using schema_translate_map and remapping "None"

2017-02-28 Thread Bertrand Mathieu
Hi, I am using sqlalchemy 1.1.5 with python 3.5 and postgresql (9.4). I have encountered what I think is a bug, it occurs when: * no schema is set in metadata or tables (schema = None) * using schema_translate_map={None: 'other_schema_name'}. It happens when joining an aliased table. Basically,

Re: alembic upgrade not idempotent?

2016-04-18 Thread bertrand
Sorry for the confusion, I meant "alembic upgrade head" indeed. As you confirmed the expected behavior, I did a bit of debugging to find out where I might have done a mistake, and I found the problem. I wrote a test revision that looked like the following: def upgrade(): bind =

[sqlalchemy] polymorphic: modification of a column on child doesn't update parent's columns marked onupdate

2013-11-08 Thread Bertrand Mathieu
, -- Bertrand -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com

Re: [sqlalchemy] polymorphic: modification of a column on child doesn't update parent's columns marked onupdate

2013-11-08 Thread Bertrand Mathieu
://docs.sqlalchemy.org/en/rel_0_8/orm/events.html Best regards, Richard. On 11/08/2013 08:38 AM, Bertrand Mathieu wrote: Hi, I have a set up class inheritance using joined table inheritance. I'm using sqlalchemy 0.8.2. The Parent class has a DateTime attribute updated_at, with onupdate=datetime.utcnow

Re: [sqlalchemy] polymorphic: modification of a column on child doesn't update parent's columns marked onupdate

2013-11-08 Thread Bertrand Mathieu
this (and I think it may be our fault), but if it doesn't, the logic is also plausible. I'll dig around the code too see what can be done. Cheers, Richard. On 11/08/2013 09:34 AM, Bertrand Mathieu wrote: Hello, Thank you for your answer, but unless I miss something in your answer my

[sqlalchemy] Strange query behavior that corrects after 30-60 seconds

2012-01-15 Thread Dale Bertrand
I'm building a simple app that writes form records to a database and displays them on a webpage. I'm using webpy 0.36, Elixir-7.1, SQLAlchemy-6.4, MySQL 5.0.92. The problem is that my app is reading a bogus number of records from the database. In fact, immediately after I create a new record,

[sqlalchemy] Booleans not converted to integers on pymssql

2010-11-15 Thread Bertrand Janin
Server 'UPDATE contract SET is_awesome=%(is_awesome)s' {'is_awesome': False} You can find a patch below that converts the ``bool`` to an ``int`` for dialects not supporting native_boolean, this fixes the problem for me, but maybe I'm approaching the issue the wrong way. Thanks, Bertrand diff

[sqlalchemy] #1952 mssql+pymssql and host:port in connect URL

2010-10-23 Thread Bertrand Janin
Hey all, I'm not sure about the process to submit a patch, so I created a ticket: http://www.sqlalchemy.org/trac/ticket/1952 Is there any reason why we would keep the current behavior of ignoring the :port number for mssql+pymssql? Bertrand -- You received this message because you

[sqlalchemy] Re: Syntax for IN (1,2,3)

2007-12-19 Thread Bertrand Croq
Le mercredi 19 décembre 2007 12:06, Marcin Kasperski a écrit : Maybe I missed something but can't find... Does there exist SQLExpression syntax for WHERE column IN (1,2,3,4) column.in_(1,2,3,4) -- Bertrand Croq ___ Net-ng

[sqlalchemy] Re: Virtual column-attribute

2007-12-19 Thread Bertrand Croq
. http://www.sqlalchemy.org/trac/wiki/FAQ#whyisntmy__init__calledwhenIloadobjects -- Bertrand Croq ___ Net-ng Tel : +33 (0)223 21 21 53 14, rue Patis Tatelin Fax : +33 (0)223 21 21 60 Bâtiment G

[sqlalchemy] Updating mappers after append_column

2007-07-18 Thread Bertrand Croq
Hi, Is it possible to reinitialize some mappers once a column has been added to a mapped table using the_table.append_column() ? Thanks. -- Bertrand Croq, Ingénieur Développement ___ Net-ng Tel : +33 (0

[sqlalchemy] Re: SELECT 'a fixed string', ...

2007-03-20 Thread Bertrand Croq
Le Mardi 20 Mars 2007 10:38, jose a écrit : try this: select([literal('a_fixed_string'), atable.c.col1, atable.c.col2]) Perfect ! Thanks a lot. -- Bertrand Croq, Ingénieur Développement ___ Net-ng Tel

[sqlalchemy] SELECT 'a fixed string', ...

2007-03-19 Thread Bertrand Croq
. Does anyone have a clue ? -- Bertrand Croq, Ingénieur Développement ___ Net-ng Tel : +33 (0)223 21 21 52 Immeuble Germanium Fax : +33 (0)223 21 21 60 80 av. des Buttes de CoesmesWeb : http