Re: [sqlalchemy] session merge sets missing children foreign keys to null

2021-12-09 Thread Gabriel Smith
at 10:38 AM, Gabriel Smith wrote: > > Hi, I'm a recent adopter of sqlalchemy, starting fresh with all the 2.0 > stuff. Thanks so much for the entire teams hard work! > > > great! > > > I have a small issue with the merge functionality and it could honestly > just be

[sqlalchemy] session merge sets missing children foreign keys to null

2021-12-08 Thread Gabriel Smith
Hi, I'm a recent adopter of sqlalchemy, starting fresh with all the 2.0 stuff. Thanks so much for the entire teams hard work! I have a small issue with the merge functionality and it could honestly just be a misunderstanding of the function from my own point of view. I have a fairly

Re: [sqlalchemy] Decimals generated as strings in query

2015-04-13 Thread Gabriel Becedillas
is 'sqlalchemy.exc.InvalidRequestError: Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter.'. This is not even getting to MySQL. Thanks a lot On Monday, April 13, 2015 at 2:46:14 PM UTC-3, Michael Bayer wrote: On 4/13/15 11:50 AM, Gabriel

Re: [sqlalchemy] Decimals generated as strings in query

2015-04-13 Thread Gabriel Becedillas
mike...@zzzcomputing.com wrote: On 4/13/15 2:25 PM, Gabriel Becedillas wrote: Dear Michael, Thanks a lot for your reply. In trying to narrow the problem as much as possible, I missed something important in my example. I'm actually doing an UPDATE, not a SELECT. When I wrote 'I tried casting

[sqlalchemy] Decimals generated as strings in query

2015-04-13 Thread Gabriel Becedillas
Dear all, I have a table that has 2 numeric columns, and I'm writing a query that performs some arithmetic on the filter clause between those columns and a Decimal. The problem that I'm facing is that I don't get any results at all. After a while I realized that the SQL statement getting

Re: [sqlalchemy] Assigning inlined query result to column in SQLAlchemy using SQLite

2014-12-14 Thread Gabriel Grant
be assigned the same computed PK? But am I correct that with the per-model, ColumnDefault version, the query is performed at insert-time, meaning that race condition doesn't exist? Thanks for the clarification! -Gabriel On Friday, 18 July 2014 12:22:47 UTC-4, Michael Bayer wrote: Hopefully I’ll

Re: [sqlalchemy] How I can filter out Saturday and Sunday?

2012-12-18 Thread Gabriel Pozo
Thanks Audrius, Your answer was very helpful, is exactly what I was looking. 2012/12/17 Audrius Kažukauskas audr...@neutrino.lt On Mon, 2012-12-17 at 11:54:20 -0800, Gabriel Pozo wrote: I am a new user of sqlalchemy, I need to know how I can filter the weekdays, to exclude Saturdays

[sqlalchemy] How I can filter out Saturday and Sunday?

2012-12-17 Thread Gabriel Pozo
Hello everyone, I am a new user of sqlalchemy, I need to know how I can filter the weekdays, to exclude Saturdays and Sundays. I look for something similar to the function dayofweek of MySQL. Thank you all, and sorry for my bad English Regards !!! -- You received this message because you are

[sqlalchemy] Re: mapped selectable forgets its primary key

2012-11-26 Thread Gabriel
On Mon, 26 Nov 2012 09:14:36 -0500, Michael Bayer wrote: On Nov 23, 2012, at 8:55 PM, Gabriel wrote: On Thu, 22 Nov 2012 21:24:08 -0500, Michael Bayer wrote: there's a lot going on here, though an initial idea would be when mapping to a __table__ that is in fact a select(), make that select

[sqlalchemy] Re: mapped selectable forgets its primary key

2012-11-23 Thread Gabriel
On Thu, 22 Nov 2012 21:24:08 -0500, Michael Bayer wrote: there's a lot going on here, though an initial idea would be when mapping to a __table__ that is in fact a select(), make that select() in terms of a Table object, not the Inode mapped class. The columns as accessed from the Inode class

[sqlalchemy] mapped selectable forgets its primary key

2012-11-22 Thread Gabriel
Hello, I have a program that maps a GROUP BY query to orm instances (let's say we have one called comm1). The instances have a relationship attribute: comm1.inodes. Something goes wrong when accessing comm1.inodes. SQLAlchemy generates a query that doesn't have a clause for the instance's primary

[sqlalchemy] using having

2009-11-09 Thread Gabriel
how can i use having? example: targets = meta.Session.query(ObjetoCusto.objeto_custo_id, ObjetoCusto.descricao).\ join(TipoObjeto).\ join(EtapaObjeto).\ filter(EtapaObjeto.ano_id == c.year).\

[sqlalchemy] Problem using multiple mappers for one class

2007-08-01 Thread Gabriel Cote
Hi, I ran into an error trying to use two mappers for the same class. I encounter the error AttributeError: type object 'MyObject' has no attribute 'my_attribute'. Using the first mapper before creating the other seems to corrupt the mapped class. Here is an example: from sqlalchemy import *