Great! Thanks!
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this
On 02/02/2017 05:35 PM, cyril.boutei...@clearlabs.com wrote:
Many Java ORMs support embedded class mappings, i.e. a relationship to a
SCO which does not have a life of its own and is embedded in the table
of the parent class, but I cannot find how to do this with SQLAlchemy.
E.g. Human has a
Many Java ORMs support embedded class mappings, i.e. a relationship to a
SCO which does not have a life of its own and is embedded in the table of
the parent class, but I cannot find how to do this with SQLAlchemy.
E.g. Human has a Head and the Head attributes get mapped inline in the
Human
On 02/02/2017 10:29 AM, Shane Carey wrote:
Okay, perhaps there is another approach?
I got my required behavior with something like
t = Stuff(**kwargs)
t = session.merge(t)
print(t.dict())
session.rollback()
But this causes the db to give t a primary key even though all I would
like is
the
Okay, perhaps there is another approach?
I got my required behavior with something like
t = Stuff(**kwargs)
t = session.merge(t)
print(t.dict())
session.rollback()
But this causes the db to give t a primary key even though all I would like
is
the associated persistent objects. Unless I can
On 02/02/2017 09:29 AM, Shane Carey wrote:
Hi, I have a use case where I need to enable relationship loading on a
single object. However, I initialize the foreign key of this
relationship using an inline select statement.
@event.listens_for(Thing, 'init', propagate=True)
def
Hi, I have a use case where I need to enable relationship loading on a
single object. However, I initialize the foreign key of this relationship
using an inline select statement.
from sqlalchemy import *
from sqlalchemy import select, and_, event, inspect
from sqlalchemy.orm import *
from