Thanks so much! Really appreciate the example.
On Wednesday, January 3, 2018 at 3:46:47 PM UTC-5, Mike Bayer wrote:
>
> On Wed, Jan 3, 2018 at 1:18 PM, Tim Chen <timc...@gmail.com >
> wrote:
> > Let's say I'm using a uuid PK for my models with a
Let's say I'm using a uuid PK for my models with a ` server_default` set to
`gen_random_uuid()` (in PostgreSQL). Is there a way to ensure the
server_default value? I would like to catch any INSERT or UPDATE
statements that set the PK value and raise an error if possible.
--
SQLAlchemy -
#sqlalchemy.orm.session.Session.merge
On Tuesday, January 2, 2018 at 11:47:06 AM UTC-5, Mike Bayer wrote:
>
> On Tue, Jan 2, 2018 at 11:44 AM, Tim Chen <timc...@gmail.com >
> wrote:
> > Hrmm, that's not what I'm getting. Maybe I'm misunderstanding something
> -
> > here's
()
session.add(user)
session.commit()
assert user.id
assert user.profile.id
test_add()
test_merge()
On Monday, January 1, 2018 at 9:49:55 PM UTC-5, Mike Bayer wrote:
>
> On Mon, Jan 1, 2018 at 9:18 PM, Tim Chen <timc...@gmail.com >
> wrote:
> > When I merge() an o
When I merge() an object without a PK, I expect similar behavior to add(),
in that the autogenerated PK is returned and set on the object. Is that
not expected behavior?
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code,
if that needs help with the correlation then we'd add some correlate()
> calls, but it shouldn't, since the FROM nesting here is clear.
> On 07/08/2016 03:21 AM, Tim Chen wrote:
> > Hi, I'm wondering what the correct syntax is for a nested correlated
> > exists subquery?
> >
Hi, I'm wondering what the correct syntax is for a nested correlated
exists subquery?
I have Message and Engagement declarative tables and here is the query i'm
trying to replicate:
select *
from message m
where exists (
select 1 from engagement e
where m.engagement_id = e.id
and exists